Linked by David Adams on Sat 11th Oct 2008 16:48 UTC, submitted by IndigoJo
General Development Eric Raymond is working on an essay, putatively titled "Why C++ Is Not My Favorite Programming Language". In his announcement, he calls it "an overcomplexity generator", "bloated, obfuscated, unwieldy, rigid, and brittle", and alleges that these characteristics appear in C++ applications also. I contend that many of the complaints about C++ are petty or are aimed at specific libraries or poor documentation and that many of the features commonly regarded as unnecessary (and excluded from intended replacements) are, in fact, highly useful. C++: the Ugly Useful Programming Language
Thread beginning with comment 333421
To view parent comment, click here.
To read all comments associated with this story, please click here.
Member since:

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.

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.

Reply Parent Score: 3

PlatformAgnostic Member since:

Hear, hear! I have much more difficulty reading C++ code than C code (or C# code) because people define so much of their own stuff in C++ and you often have to jump around a lot to base classes, odd operator overloads, and template code (sometimes this is hard in a debugger).

Reply Parent Score: 2