[Top][All Lists]

[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: Fri, 13 Jun 2008 14:15:39 +0100

On 12 Jun 2008, at 20:55, Richard Frith-Macdonald wrote:

I've not checked whether GCC will emit them when targeting the GNU runtime or not.

If it does, I guess we should/must implement support for it in the collections in GNUstep-base. Though to be honest I think the language would be better off without this feature (and without properties) ... in the few cases where performance at this kind of level matters, there are already other approaches you can take without changing the language, and keeping the language simple is a virtue.

I agree. The fast enumeration pattern can easily be implemented using C macros - it almost is in GCC, which just expands it into a few simple calls. In √Čtoil√© we have a FOREACH macro which uses iterators and performs IMP caching on the -nextObject method. It's slightly slower than the fast enumeration system, but it works without modifying the collection objects and so works on things like the Address Book collections (which Apple's fast enumeration doesn't, or, at least, didn't when Leopard shipped).

I'm still in two minds about properties. They do save a bit of typing when declaring set / get methods, and the ability to add instance variables that are not visible outside the class is nice, but I am not entirely sure they add anything that late-bound ivars don't.

That said, Apple seem to be encouraging people to use all of this extra syntax, even when it isn't sensible, and so it's probably worth supporting.


reply via email to

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