Re: Why Objective-C over Java?
Re: Why Objective-C over Java?
- Subject: Re: Why Objective-C over Java?
- From: "Dennis C. De Mars" <email@hidden>
- Date: Sat, 26 May 2001 10:18:52 -0700
on 5/26/01 8:25 AM, Youngjin Kim at email@hidden wrote:
>
Hi,
>
I am a new to OS-X programming and I don't have experience with
>
Objective-C.
>
I understand that Objective-C is seemingly not hard to learn, but I want
>
to stay with Java at this stage because of compatibility and reuse
>
issue. Thus it seems to be natural for me to stick to java and jump
>
into writing for OS-X with it.
I'd suggest that you at least learn to read Objective-C code even if you
decide to use Java. Although Apple is trying to maintain the reference
documentation in both languages, beyond that most of the tutorials, example
code, etc. are likely to be in Objective-C. At least if you are conversant
in both languages you will be able to understand any documentation you
encounter.
>
However I'm curious how many people have been there, and how do you
>
think about Java in OS-X and PB/IB environment. Would it be more
>
productive to start with Objective-C? Isn't there any major pitfall
>
hidden? Most people in this list seems to be working with Objective-C
>
API. Does Apple recommend Objective-C over Java? if so, what's the
>
reasoning behind this?
The main pitfall right now seems to be that not quite 100% of the Cocoa
interface is supported for Java and some of the existing interface has bugs.
At least that is what I gather from some complaints I've seen from Java
users. Presumably, Apple will fix these problems though.
Apple is agnostic (officially) about which language you use. In fact, I
presume that they chose the name "Cocoa" to emphasize the existence of a
Java interface. I'm sure they will continue to support the use of Java.
I can tell you the reasons I personally prefer to use Objective-C. I
examined the issue when the first documentation in Java and Objective-C
started coming out for Cocoa. At the time I knew some Java but not
Objective-C, although I was familiar with the general feature of
Objective-C. I decided against Java though, becuase:
1) I felt I would pay a performance penalty if I used Java, especially when
it became clear that that a compiled Java would not be an option, but you'd
have to run on a Java VM. I couldn't see writing applications that run on a
virtual machines if it could be avoided.
2) Objective C effectively has named parameters, which makes Cocoa calls
with multiple parameters much more readable in Objective C than Java.
However, I am sure there are _some_ developers out there using the Java
interface, maybe some of them would like to chime in and talk about their
experiences.
- Dennis D.