Re: Java vs C++
On 14-02-2011 08:22, Andreas Leitgeb wrote:
Arved Sandstrom<asandstrom3minus1@eastlink.ca> wrote:
In the case of the .NET CLR and the JVM and scripting language
interpreters, those _are_ the platforms.
That's funny, because by that definition, Java apps (and .NET and scripts)
would be entirely *unportable* - i.e., work only on that one "platform" ;)
Stroustrup once said that Java is not cross-platform but instead it
is a platform itself.
And that is a bit funny.
But the practical impact is not that big.
You can move your jar file to Windows, Linux, Solaris, MacOS X,
OpenVMS, z/OS and run it unchanged.
C, OTOH, has been very good wrt question (1) for a long time. But it
requires varying degrees of work wrt question (2), on a _case by case_
basis...
I do have the impression of a violent agreement here.
Lawrence perhaps sees the difference not all that large as many
others do, though.
Maybe not, but it is pretty easy to look at some of that C/C++ code
and see the ifdefs.
I would not expect
to be writing C code that accomplishes the same things, and be able to
plunk it into gcc or VS on all those platforms, and watch it compile and
link without any mods.
Depends on what libs you build upon in C (or C++).
Those libs likely have lots of #ifdef'ery inside,
1) That is relative rarely the case
2) It does not make the app portable - it just make the app
run on the platforms the lib is supporting
Arne