Linked by David Adams on Sat 11th Oct 2008 16:48 UTC, submitted by IndigoJo
Thread beginning with comment 333411
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Before you get rid of C++ ....
by StaubSaugerNZ on Sun 12th Oct 2008 18:04
in reply to "RE[2]: Before you get rid of C++ ...."
I think you're confused, kid. Java and .NET can run with some of their code compiled to native machine code at runtime, but that's not the same thing as a language that compiles to native code. You still need the actual managed runtime environment (which is quite different than just linking a shared library) for Java/.NET to work.
Basically, with C/C++, you can write code that runs on a machine in which no existing runtime or standard library yet exists (assuming your compiler has a target for it), where-as with Java/.NET, you need to port millions of lines of code (which themselves are written in -- wait for it -- C and C++) over to the platform first.
Basically, with C/C++, you can write code that runs on a machine in which no existing runtime or standard library yet exists (assuming your compiler has a target for it), where-as with Java/.NET, you need to port millions of lines of code (which themselves are written in -- wait for it -- C and C++) over to the platform first.
No, you are the incorrect "kid". You have obviously never hear of the GCJ implementation of Java, so perhaps you ought to do some more research. GCJ can be statically compiled to a single native binary with no runtime dependencies. I don't know if there is a .NET equivalent, but Java certainly has this ability. It runs as fast as GCC (which, incidentally, is slower than the Sun implementation of Java).
I spent nearly a decade working with C++ but now use Java because:
1) it is (finally) fast enough (faster than C++ in many cases)
2) it is faster to develop
3) the (free!) tools are better
4) it runs everywhere (my customers have a variety of environments, from embedded systems to enterprise servers)
5) Memory isn't that much of an issue (you can get cheap embedded platforms with 64 MB memory)
6) it has libraries that work on all platforms
and, most important of all
6) it is usually much easier to read Java code written by others than C++ (especially barely-skilled corporate programmers)
I'm guessing that most of the advocates of C++ are mostly reading code written by themselves and don't have to read a lot of code written by other people. That is one area I've found Java usually beats C++. This is what I think the earlier poster saying C++ should be written like "Java" - alluding to a code style which can easily be followed by others.
RE[4]: Before you get rid of C++ ....
by PlatformAgnostic on Mon 13th Oct 2008 07:11
in reply to "RE[3]: Before you get rid of C++ ...."




Member since:
2007-02-17
I think you're confused, kid. Java and .NET can run with some of their code compiled to native machine code at runtime, but that's not the same thing as a language that compiles to native code. You still need the actual managed runtime environment (which is quite different than just linking a shared library) for Java/.NET to work.
Basically, with C/C++, you can write code that runs on a machine in which no existing runtime or standard library yet exists (assuming your compiler has a target for it), where-as with Java/.NET, you need to port millions of lines of code (which themselves are written in -- wait for it -- C and C++) over to the platform first.