discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Objective-C 2.0


From: Richard Frith-Macdonald
Subject: Re: Objective-C 2.0
Date: Wed, 2 Sep 2009 12:59:09 +0100


On 2 Sep 2009, at 12:17, Michael Thaler wrote:

Hi,

I am currently learning Objective-C on the Mac (using that book:-)) and I was wondering if Objective-C 2.0 is available on Linux and if it can be used for
gnustep development.

If it is available is it ok to use it for gnustep? If it is not available, are
there any plans to support it?

It's not available. There are people working on different bits of it, but no concerted plan.

I think especially having a garbage collector
would be quite interesting. Personally I think having a GC would be a
sustantial advantage of gnustep over, e.g. Qt.

GNUstep has GC support in the make package and base library, but nowhere else. It's not quite the same as Apple's implementation, but shares most of the same API. I have to say that GC has to be considered at best beta-test quality and getting it working four you would probably take some effort.

If it is partly available, which features can (should) be used? Are blocks available (which seem to be a propertery Apple extension to C-like languages)?

I would avoid most of the new features. Largely the gcc compiler doesn't support them (though David Chisnall is working on adding support for a lot to Clang). Often the new features are arguably bad. You should be able to use fast enumeration (the API is there in gnustep-base, even of the lack of compiler support means that you won't actually get the promised performance benefit). You should be able to use GC with some work. I'd avoid using properties ... even if/when we do get support for properties, I'd argue that they do more harm to code clarity/design than can be compensated for by their advantages.

Is it possible to write applications that can be compiled on both the Mac
using Cocoa and Linux using gnustep?

Sure ... very easy ... just develop on GNUstep and then build from the GNUstep source on the Mac. Doing it the other way round is the harder way as it's much easier to find yourself writing non-portable code on the Mac, but if you stick strictly to the Cocoa APis (the older ones) you would probably be OK.




reply via email to

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