Do I really need to learn Java?
william.smith162 at verizon.net
Mon May 14 17:43:36 CEST 2001
Hanna Joo wrote:
> Can somebody explain what the advantages/disadvantages of using Java (or
> C++) compared to python? And whether I will have to use Java in certain
To a large extent, this is a matter of personal taste rather than of
hard, objective evidence. Of course, these are the kinds of matters than
lead to the bitterest flame-wars....
The original C language was written over 20 years ago, on machines that
would make a Commodore-64 look big and fast. The major requirement was
to create programs that ran fast enough to be worth running. Portability
soon became another feature, but speed on each platform remained
paramount. For instance, if a given platform had a 'natural' integer
size of 8, or 16, or 32, that was 'sizeof(int)' for that platform.
C++ was intended to add object-orientated features to regular C, keeping
speed as its main requirement. Like C, C++ has syntax that is highly
arcane and is littered with mine fields. By this I mean that tiny little
changes in your source code will create huge differences in what the
program does and how fast it does it; learning the best way to do
something in C or C++ takes at least a year of writing/reading programs
at least 50 hours per week--if you've got a good mentor.
It is a gross oversimplification, but not too very outrageously false,
to say that Java is like C++ but with less of the 20-year-old baggage
from C. It is "more-object-oriented" than C++. It's major failings, for
me, are lack of speed and its insistence on declaring thrown exceptions.
Lack of speed, compared to C++, is partly due to its interpretive nature
and to its object-orientation. The declarations make it easier for a
piece of code to be considered trustworthy.
So, back to your question. Should a beginning programmer learn Java, or
C++ ? For the next several years, at least, there will be LOTS more jobs
for Java coders than for pythonistas My advice would be to learn
object-oriented coding, using Python, Ruby, or Smalltalk, and branch out
to Java, but only after learning OO coding thoroughly. After that, you
could learn C++ pretty well if you *needed* to.
More information about the Python-list