On 11/3/2011 5:57 PM, Arne Vajh?j wrote:
On 11/3/2011 12:34 AM, BGB wrote:
On 11/2/2011 5:20 PM, Lew wrote:
BGB wrote:
markspace wrote:
BGB wrote:
for example, someone could make an extended form of Java
which adds ifdef's...
I rest my case. :-)
but, ifdef is a useful and powerful feature...
Only useful for a non-portable language.
C and C++ apps run on plenty enough targets to demonstrate that they are
useful for portable code.
There are a lot of C/C++ apps that runs on many platforms.
But portability for Java and portability for those does not
mean the same thing.
Java portability mean that you upload the jar file and
run it as is.
C/C++ portability means that you do the proper defines, often
add some new ifdef sections and then rebuild the code for
the target platform.
yep, this is an advantage of a bytecoded program representation vs a
traditional precompiled binary.
my case is sort of a hybrid:
generic HLL code should presumably be (reasonably) portable;
but, the program may still use ifdefs for OS-specific stuff (and may or
may not be limited to targets with a compatible combination of ifdefs).
however, for the most part HLL code will likely depend some on the
underlying app, so will generally only be as portable as the underlying
app. Java, OTOH, is designed mostly for creating standalone apps (so,
its portability is mostly bound by library and run-time features...).
therefore portable as well.