Marcel Kilgus wrote:
[EMAIL PROTECTED] wrote:

Just curious as to the negativity -


I thing the *language* Java is ok, but the concept of using a virtual
machine to artificially slow down perfectly fine and fast PCs is
braindead (actually it is fine for Web applications that ought to run
on a lot of different platforms, which is where Java originated, but
NOT for ordinary applications on a stand-alone machine).

The Java language (and especially reflection, dynamic class loading and all things class loader related) actually makes some things relatively easy which are very difficult (if not impossible) in many other languages.


Speed is not the issue. These days many people write C/C++ code including many checks (and more then once) because they can not rely on the compiler to do them. When the compiler can do these checks it is likely to do them only once.

While Java *can* be run using a interpreter (which I assume is what you actually mean when you say "virtual machine"), that is indeed wasteful of clock cycles. However, the latest breed of JIT compilers does not interpret anything, it simply compiles code later rather than sooner. Combined with classloader tricks this is very powerful.

There actually are benchmarks (ok, I know these are not always equally correct) which show that Java code runs *faster* then equivalent C++ code.

In short, and as always, it is mainly the skills of the programmers which determine whether a program runs fast and/or uses a lot of memory.

Also, Java as a whole favours the laziness of the programmer over the
effectiveness (in CPU/RAM utilisation) of the end result. And I deeply
resent wastefulness. I almost collapsed when, only last weekend, one
of those "Java is best" computer science students I know proclaimed
that he now needs 1GB of ram in his laptop and any CPU below 1Ghz
ought to have been thrown away years ago anyway.

You can write sloppy and wasteful code in any language. What matters most is that it is more difficult to write properly working code in some languages than in others. AFAIK Java is on the better side. While C was a reasonable language, C++ in the hands of most programmers will only result in code which is very difficult to maintain.


Joachim (yep, doing Java most of the time these days, and chose it myself).

_______________________________________________
QL-Users Mailing List
http://www.quanta.org.uk/mailing.htm

Reply via email to