Re: Cocoa Developer in Training: Language Question (ObjC or Java)?
Re: Cocoa Developer in Training: Language Question (ObjC or Java)?
- Subject: Re: Cocoa Developer in Training: Language Question (ObjC or Java)?
- From: Thomas Lachand-Robert <email@hidden>
- Date: Thu, 3 Jan 2002 23:24:49 +0100
Le jeudi 3 janvier 2002, ` 05:58 , Reno Marioni a icrit :
Hi,
I was once a developer a very long time ago and
(...)
My question: If you were starting out, would you start out
with Java or Objective C for developing Cocoa apps?
Hi Reno,
I was myself in a very similar position one year ago. Unfortunately, I was
not so smart as you are, and didn't take advice. So I made the wrong
decision, and learned Java. Six months later I just gave up and now I
really enjoy programming Cocoa with Obj-C.
Let me give you some details:
1/ Java is a great language, with wonderful features, in particular when
related to Internet applications. But it is not intended to build
non-internet applications, and makes life difficult to programmers when
doing so. That's particularly clear when doing GUI-based apps. Swing, the
Java GUI, is far from being as good as Java itself. Cocoa with Java is
even worse. So if you intend to make great apps on Mac OS X, with a slick
user interface, use Cocoa the way is has been intended to be used: from
Obj-C.
2/ Obj-C has a strange syntax (a little bit disgusting for a C, C++ or
Pascal programmer), but when you get used to it, it is really a pleasure
to use it (in combination to Cocoa classes). It helps a lot, and never get
on your way (something Java does frequently). Also it is much faster and
easier to learn than Java, even taking into account the retain/release
trick (which has its own advantages, and I don't find it difficult at all)
.
3/ You can't learn Java in isolation. You will have to learn at least some
part of the standard Java Frameworks. Then you have to learn Cocoa
frameworks. Both have different logics, different usages. You will get
confused. (The picture is different if you already know Java, obviously).
4/ If you already know C++ (or some parts of it), you can use it
(partially or not) in complete interaction with Obj-C: that's named Obj-C+
+. It is just C + the syntax extensions of Objective C + the syntax
extensions of C++ (which are orthogonal, fortunately).
I would like to add that you are completely wrong when stating that Obj-C
is fading away. First the Obj-C language get a strong support from
Obj-C++, because C++ is widely used, and you can learn the former from the
latter in three hours. (Java requires much more study.) Second Java is in
a difficult position because, as you certainly know, it is challenged by a
large company whose name begin with Mi and ends with soft (though it is
hard). It is somehow in the position of Netscape six years ago. Hmm. Do
you remember Netscape? Third Obj-C is deeply nested inside Mac OS X, and
there is absolutely no reason for Apple to remove it (would be a lot of
efforts for gaining what?). So it will probably continue to exist as long
as Mac OS X itself. We all hope that will be a long time, don't we?
Someone else here told you that most student courses are given in Java.
This is completely right. Ten years ago, the same courses were given in
Pascal. Pascal was a great language, but who is using it now? I myself
wouldn't certainly use Obj-C as a teaching language (would be quite a
short course ;-), but I recommend it to real developers on Mac OS X.
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.