Good news everyone: As all-time-hero John Siracusa points out, we will eventually have Garbage Collection in Objective-C, at least when a) Mac OS X.5 Leopard comes out and b) everything goes as planned. Looks like the corresponding pointer in the gcc was available since first release of Tiger, but nobody really looked at gcc’s manpage, or those who did simply told it no-one.
Enable garbage collection (GC) for Objective-C objects. The resulting binary can only be used on Mac OS X 10.5 (Leopard) and later systems, due to additional functionality needed in the (NeXT) Objective-C runtime.
For the non-programmers: In C-Type languages like Objective-C, you have to manage to memory of every variable yourself, by counting every reference made to the variable and releasing the memory, when no-one references to it anymore. If you release to early, your application will crash, if you release to late or never at all, you have a memory-leak and your application will get slower and slower and slower and finally start to do funny things like crashing. Managing memory is quite painful, especially for beginners or people like me, coming from a language where you don’t need to.
Garbage Collection is a feature of Classic Languages like Smalltalk and some newer languages like Java, Ruby, Python and C#, and simply said, GC does it all for you – you just don’t have to worry about memory anymore.
Objective-C is THE progamming language for Mac OS X, almost all never applications are written in it. Bringing Garbage Collection to Objective-C means lower hurdes for new Mac Programmers, probably leading to more Mac Programmers and more cool software.
Just great news. Hope they will succeed in making a real good Garbage Collection and not having to withdraw this.
Sore Points in Developping for Mac : -1
Remaining only my wish for good refactoring tools in XCode, and then I will be happy after all.