Re: FW: Objective C vs. Java
Re: FW: Objective C vs. Java
- Subject: Re: FW: Objective C vs. Java
- From: Deirdre Saoirse Moen <email@hidden>
- Date: Thu, 10 May 2001 10:22:55 -0700
> Does anyone have any logical or illogical reasons to prefer Java or
> Objective-C for Cocoa development?
I'll give you the best logical reason of all: cost, both long-term
and short-term.
People tend to forget about Fred Brooks' other law, the one that
explains why operating systems tend to be coded in higher-level
languages: because a programmer's productivity, in terms of lines of
code, is essentially constant regardless of language.
Other things equal, a language that's terse and clear will be more
efficient for both initial coding and maintenance and thus more
cost-effective. And it's fairly clear, even in small examples, that
Objective-C is significantly terser than Java without being more
obscure.
I'll admit that, at first, I found ObjC weird, but somehow, after
having written a bunch of new TiVo features in TCL, suddenly it
doesn't seem odd at all. :) (TCL also has that square bracket syntax
thing going)
Add this to the fact that Java *appears* to be simple -- but isn't,
and I'd say Objective-C wins hands-down even without taking into
account some of the excellent critiques of why not to use Java, such
as the one disguised as a fan of Java irritated with the language:
http://www.jwz.org/doc/java.html
> From things I've seen and heard, I'm concerned about the following:
Everyone (but me) knows Java, so it seems a good choice as far as finding
more engineers in the future as the product gets bigger..
Is Java _demonstrably_ less efficient than ObjC in MacOSX?
This product will eventually connect to a back-end server that speaks HTTP
> and/or XML. Should this influence my decision?
If you want to run something as a long-running process, don't use
Java. I'm sure other people will disagree with me, but they probably
aren't wearing pagers. Remember that developed processes have to run
and, for that, you need the cooperation of sysadmins.
Most JVMs, in intense production environments, have half-lives
coinciding with elements high on the periodic table (yes, even Sun's
and yes, even on Solaris). I know more sysadmins who've quit over
Java processes dying and paging them during the night than any single
other cause, including managerial stupidity. I myself personally
still have nightmares about this on occasion (yes, I was a
sysadmin...).
One of the reasons is that Java and JVMs are thread addicts. My
husband, who does tech support for a Linux company, says that
whenever he gets the question (delivered in several hundred forms,
but at least twice a week) "how do I increase the maximum number of
threads on Linux?" he knows it's a runaway Java app.
I'll spare you the rest of my "Why Java is Cobol 2.0" rant though. :)
--
_Deirdre Stash-o-Matic:
http://weirdre.com http://deirdre.net
Macintosh Developer (seeking work): Will work for Cocoa
"I love deadlines. I like the whooshing sound they make as they fly by."
- Douglas Adams