| From the man himself, here is what
Bjarne Stroustrup has to say about Java.
Is Java the language you would have designed if you didn't have to be compatible
with C?
No. Java isn't even close. If people insist on comparing C++ and Java - as they
seem to do - I suggest they read The Design and Evolution of C++ (D&E) to
see why C++ is the way it is (Java: Why It is the way It is)
, and consider both languages in the light of the design criteria I set for
C++. Those criteria will obviously differ from the criteria of Sun's Java team.
Despite the syntactic similarities, C++ and Java are very different languages.
In many ways, Java seems closer to Smalltalk than to C++.
Much of the relative simplicity of Java is - like for most new languages -
partly an illusion and partly a function of its incompleteness. As time passes,
Java will grow significantly in size and complexity. It will double or triple
in size and grow implementation-dependent extensions or libraries. That is the
way every commercially successful language has developed. Just look at any
language you consider successful on a large scale. I know of no exceptions, and
there are good reasons for this phenomenon.
Java isn't platform independent; it is a platform. Like Windows, it is a
proprietary commercial platform. That is, you can write programs for
Windows/Intel or Java/JVM, and in each case you are writing code for a platform
owned by a single corporation and tweaked for the commercial benefit of that
corporation. It has been pointed out that you can write programs in any
language for the JVM and associated operating systems facilities. However, the
JVM, etc., are heavily biased in favor of Java. It is nowhere near being a
general reasonably language-neutral VM/OS.
Personally, I'll stick to reasonably portable C++ for most of the kind of work I
think most about and use a variety of languages for the rest.
|