discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q's about GNUstep (-make & -base)


From: David Chisnall
Subject: Re: Q's about GNUstep (-make & -base)
Date: Thu, 12 Jun 2008 16:56:56 +0100

On 12 Jun 2008, at 16:30, Richard Frith-Macdonald wrote:

- is it likely in the near future (or ever) that Objective-C 2.0 language support will be provided? Mainly interested in the syntax changes like @properties, @synthesize, fast enumeration (which I suspect gcc 4.3 will mainly support)
 rather than garbage collection which I am unlikely to use.

AFAIK, while some people have expressed an interest in part of it, nobody is working on that ... but I'm not sure. i don't think many people like the syntax changes, so I guess we are more likely to see more popular/useful features (like non-fragile instance variables) in the near future.

There are a few issues here.  In no particular order:

Properties require no runtime support. They are purely a compiler feature. I believe one of the Apple guys mentioned that they were working on them for the FSF GCC tree, although I can't remember who. In clang, they are supported by the parser and AST, but I haven't yet written codegen code for them. Some uses of the @synthesize directive require late-bound ivar support. I am planning on adding this to clang and the GNU runtime, but have not yet done so.

Please be aware when using properties that it is very easy to generate code which is much, much, slower than it looks as if it ought to be. Apple made a number of questionable design decisions when specifying this part of the language.

Fast enumeration requires the collection to implement a method for getting the next 16 values and putting them in a buffer allocated in the caller's stack frame. This is very easy to implement in GNUstep, although I don't know if anyone's bothered. I've not checked whether GCC will emit them when targeting the GNU runtime or not.

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]