Re: Java or Objective-C for Cocoa?
Re: Java or Objective-C for Cocoa?
- Subject: Re: Java or Objective-C for Cocoa?
- From: Chris Hanson <email@hidden>
- Date: Fri, 2 Apr 2004 11:34:12 -0600
My advice is usually to learn Cocoa with Objective-C, its native
language. But I also suggest learning Java separately. There are good
points to both languages, and you'll be a better developer for knowing
both.
There are some things Java has over Objective-C:
* It's a VM-based language, which means you're insulated from the
hardware. I don't mean this in the sense that it's
platform-independent, but rather that if the VM gets support for new
hardware features (like 64-bit arithmetic) your application gets those
"for free." Also, it insulates the developer from machine pointers;
this eliminates an entire class of errors, but it also prevents an
entire class of optimizations.
* It uses automatic memory management ("garbage collection"). Again,
this eliminates an entire class of errors, but it trades that off
against some performance. However, GC isn't a huge burden for most
applications; peoples' opinions of GC seem to be largely based on 1970s
Lisp implementations so there's all sorts of talk about "huge pauses."
In a Cocoa-Java project I worked on I never noticed the GC.
* It has a flexible namespace mechanism. I prefer namespaces to
prefixes, though they amount to the same thing.
* Java has a *lot* of third-party libraries. However, Sturgeon's Law
("90% of everything is crud") applies to these. However, there are a
*lot* of third-party libraries...
Still, I definitely develop applications faster in Objective-C. It's a
much more dynamic language, with better Cocoa tool support, and once
you learn the patterns and idioms things like memory management and
machine pointer access aren't really an issue.
This is why I suggest learning Cocoa in its native language,
Objective-C, and learning Java separately. Then you can judge for
yourself when it makes sense to make the tradeoffs between the two.
-- Chris
-- then there's Python, and Ruby, and...
--
Chris Hanson <email@hidden>
http://www.livejournal.com/users/chanson/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.