Should I learn C++?

J

James Kanze

James said:
[...]
C++ can be used anywhere Java can,
That's not true. There are contexts where the fact that the
compiled code can run on a machine you've never heard of is an
advantage, or even a necessity, and you don't need a high degree
of reliability.
If Java can run on it, it has a JVM which is written in ...

And an OS written in ... And if I use C++, the C++ compiler
generates ...

Who cares? That's not my problem.

FWIW: I generally use C++, and don't think that Java is at all
appropriate for what I do. But my choice is not based on any
absolute rule, and there are contexts for which C++ is not the
language of choice. (While I don't use Java in my work, I do
make extensive use of shell scripts, for example.) The
statement "C++ can be used anywhere Java can" is, from one point
of view, vacuous. From a theoretical point of view, they're
both Turing complete, and any program that can be written in
one can be written in the the other, so yes, C++ can be used
anywhere Java can, and Java can be used anywhere that C++ can.
From a pratical point of view, of course, any number of issues
in addition to Turing completeness have to be taken into
account, and the result is that there are places where Java will
be suitable, and C++ not, and vice versa.
 
J

James Kanze

Ian Collins wrote:
:: James Kanze wrote:
::: On Apr 14, 11:58 pm, Ian Collins <[email protected]> wrote:
::: [...]
:::: C++ can be used anywhere Java can,
::: That's not true. There are contexts where the fact that the
::: compiled code can run on a machine you've never heard of is an
::: advantage, or even a necessity, and you don't need a high degree
::: of reliability.
:: If Java can run on it, it has a JVM which is written in ...
C++ of course. The most portable language. :)

Actually, it depends on the platform, and most JVM are still
written in C. Which is still far more portable than C++.
Java is sometimes easier to use, when someone else has already ported the
JVM for you.

This is really getting a bit silly, don't you thing? How many
Java programmers write their own JVM?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top