Sender: |
|
Subject: |
|
From: |
|
Date: |
Fri, 25 Jun 1999 08:07:01 -0500 |
X-To: |
|
Reply-To: |
|
Parts/Attachments: |
|
|
> >... much-exaggerated claim ... that the Java _language_ is
> >somehow more portable than any other. It is not.
>
> Well, in fact it is. Very little in the Java language is left
> implementation dependent. Order of expression evaluation? Left to right.
> Size of primitive data? Completely specified (e.g. 32 bit 2's complement
> for int, etc.) Parameter passing? By copy. Semantics of floating-point
> arithmetic? IEEE-754. References to uninitialized values? This can't
> occur. Character set? Unicode.
Well, I suppose you are correct--but only for the the platforms that have
JVMs which are not made by Microsoft or HP. :-) And which correctly
implement IEEE-754 even if the platform doesn't. In the points you
mentioned, Java IS more portable than Ada and FAR more portable than C or
C++. (Except also that Ada's character sets are as clearly-defined as
Java's, and Ada's parameter passing almost as clearly-defined.)
The reason I didn't consider that is that the Java advocates themselves
seem to think of portability in terms of J-Code and the JVM.
> .... API is a different situation; e.g. there have been horror stories about
> the non-portability of the AWT. And obviously the effects of environment
> inquiry methods depend on the platform. But as far as the Java language
> semantics are concerned, the designers sought to completely eliminate
> implementation-defined/dependent behavior, and they have come pretty close
> to meeting that goal.
I hadn't thought of this either. It's a bit misleading to crow about the
portability of a language when almost all programs depend on a "standard"
library that is non-portable. (In fairness, I've seen lots of UNNECESSARY
implementation-dependencies in Ada programs.)
|
|
|