Objective C - cross platform learning

4 views
Skip to first unread message

Saptarshi Guha

unread,
Sep 5, 2009, 6:13:07 PM9/5/09
to program...@googlegroups.com
Hello,
I am asking this question on this list because a) i have spent a small amount of time here b)Nu works remarkably well using GNU Objective C and OS X.
So here goes, 
Q: I've spent time coding in Objective C on OS X but never on Linux.  However, I'd like to improve my skills in the language itself in such a way that 
that my code is not tied to OS X but compiles equally well on linux(using GNU Objective C)

So this entails learning how to build on both platforms and learning the language without slipping into OS X specific usage. 
Is there any book that teaches Objective C in a non OS X specific manner? Or will any book do and that I should keep some general pointers in mind(e.g
NS* classes are available in GNU , is that right?)

Thanks in advance for your time.
Regards
Saptarshi

Tim Burks

unread,
Sep 6, 2009, 3:10:27 PM9/6/09
to program...@googlegroups.com

Hi Saptarshi,

My favorite book on Objective-C is still Andrew Duncan's pocket reference (O'Reilly). Since it predates ObjC 2.0, nearly everything in it will work with GNUstep and on Linux. We've also found that @try/@catch exception handling is also now available in recent versions of GNUstep (replacing the older NS_DURING macros).

Generally, I'd just say "try it" about using Nu and ObjC on Linux.  A few of us have been running Nu on Debian 5; build instructions for that are now in notes/DEBIANINSTALL in the Nu sources. Some obvious things that aren't supported include properties and garbage collection, and I thnk that desktop programming would be hard with the current libraries, but so far it's been working well for command line and server-side tasks.

Tim

Saptarshi Guha

unread,
Sep 6, 2009, 3:20:07 PM9/6/09
to program...@googlegroups.com
Hello,
Much thanks for the words of advice. Don't know if this relevant but it appears GNU Objective C now has facilities for GC.


Regards
Saptarshi

Matt Rice

unread,
Sep 8, 2009, 4:23:07 AM9/8/09
to program...@googlegroups.com
On Sun, Sep 6, 2009 at 12:20 PM, Saptarshi Guha<saptars...@gmail.com> wrote:
> Hello,
> Much thanks for the words of advice. Don't know if this relevant but it
> appears GNU Objective C now has facilities for GC.
> http://gcc.gnu.org/onlinedocs/gcc-2.95.3/objc-features_1.html#SEC5

This garbage collector actually predates the one available on OS X,
may not be compatible, It is an ongoing question whether anyone uses
this garbage collector in
conjunction with GNUstep, or whether any support in GNUstep for this
garbage collector works.

the last time I looked any GC methods were not compatible with the OS X ones
e.g. i believe the finalize method was named gcFinalize.

so I wouldn't expect this to be a cross platform solution.

Jason Grossman

unread,
Sep 8, 2009, 5:21:22 AM9/8/09
to Programming Nu

On 08/09/2009, at 6:23 PM, Matt Rice wrote:

> It is an ongoing question whether anyone uses
> this garbage collector in
> conjunction with GNUstep, or whether any support in GNUstep for this
> garbage collector works.

I believe the people who are writing the Etoilé framework are using
it: http://etoileos.com/news/archive/2008/07/06/1636/

Jason

Jason Grossman

unread,
Sep 8, 2009, 4:30:46 AM9/8/09
to program...@googlegroups.com

On 08/09/2009, at 6:23 PM, Matt Rice wrote:

> It is an ongoing question whether anyone uses
> this garbage collector in
> conjunction with GNUstep, or whether any support in GNUstep for this
> garbage collector works.

I believe the people who are writing the Etoile framework are using
it: http://etoileos.com/news/archive/2008/07/06/1636/

Jason

Reply all
Reply to author
Forward
0 new messages