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 333400
To view parent comment, click here.
To read all comments associated with this story, please click here.
IndigoJo
Member since:
2005-07-06

Really? Don't forget that .Net is a JIT compiled system, which means that the first time any part of the software is used, it's slow because it's being interpreted and compiled at the same time, yet it never reaches the performance levels of a native-compiled program. Why would MS put their customers through that - something which would become very public when they are selling a large program for hundreds of pounds or dollars - when they can just use something they can compile, and ship it out ready to go?

Apart from ThinkFree, can anyone name any heavyweight software, open-source or proprietary, which is based on a non-native platform?

Reply Parent Score: 3

ciplogic Member since:
2006-12-22

About your question:
- bloated C code: GNOME Desktop
- bloated C++ code: OpenOffice and KDE4 desktop
- slim Java code: Eclipse (the start is slow but after that is faster than Visual Studio written in C++)
- well written C code: Apache Http server, Linux kernel, a lot of other examples
- bad written, memory hungry code (C): GCC compiler tools and linker

C++ was not able to remove the legacy so the compiling of some C++ files may take hundred of megabytes, if they use multiple headers + templates on GCC (cause of including headers, expanding templates, etc.) still hard to match in a big sourcecode.

Java/.NET is useful in places where the speed matter (that is why they do benchmarks on Java) but mostly to simplify a complex business logic that C++ rarely can match. The C++ advantage remains still the huge codebase that is hard to be matched by any non C/C++/ObjectiveC language/environment.

Edited 2008-10-12 12:46 UTC

Reply Parent Score: 2

werpu Member since:
2006-01-18

About your question:
- bloated C code: GNOME Desktop
- bloated C++ code: OpenOffice and KDE4 desktop
- slim Java code: Eclipse (the start is slow but after that is faster than Visual Studio written in C++)
- well written C code: Apache Http server, Linux kernel, a lot of other examples
- bad written, memory hungry code (C): GCC compiler tools and linker

C++ was not able to remove the legacy so the compiling of some C++ files may take hundred of megabytes, if they use multiple headers + templates on GCC (cause of including headers, expanding templates, etc.) still hard to match in a big sourcecode.

Java/.NET is useful in places where the speed matter (that is why they do benchmarks on Java) but mostly to simplify a complex business logic that C++ rarely can match. The C++ advantage remains still the huge codebase that is hard to be matched by any non C/C++/ObjectiveC language/environment.


Well from a library standpoint Java probably nowadays surpasses C++ by miles. I am not talking about the huge classlib which comes with every JDK. C++ people alwyays talking about the STL really makes me laugh, this feels like being stuck in the early nineties. But there is a myriad of third party libs and literally thousands of really well written opensource extensions. Add to that the probably best coding tooling in the world, and you can see that sometimes it makes sense to look what others are doing in their domain!

Reply Parent Score: 1

PlatformAgnostic Member since:
2006-01-02

It's possible (and done with all libraries and many commercial .NET packages) to have the code precompiled into native images and stored in the .NET image cache using the NGEN system. This has a mixed effect because some of the dynamic parts of the code become slower (the native code has to have extra checks for cases which were not known at pre-compiling time). On the other hand, the code pages become shareable and you don't pay the initial load time and runtime costs of JITting the code.

It's possible to have C# compiled all the way to native code and have no JIT at all. The Bartok compiler from the Singularity group at MSR does this.

Reply Parent Score: 2

IndigoJo Member since:
2005-07-06

Is the Bartok compiler commercially available, or has anyone come up with an open-source native compiler? (I guess not, because we'd know about it.)

Reply Parent Score: 1

werpu Member since:
2006-01-18

Really? Don't forget that .Net is a JIT compiled system, which means that the first time any part of the software is used, it's slow because it's being interpreted and compiled at the same time, yet it never reaches the performance levels of a native-compiled program. Why would MS put their customers through that - something which would become very public when they are selling a large program for hundreds of pounds or dollars - when they can just use something they can compile, and ship it out ready to go?

Apart from ThinkFree, can anyone name any heavyweight software, open-source or proprietary, which is based on a non-native platform?


Yes, basically all java web containers, Eclipse, Netbeans, Intellij, Google Android, Limewire etc...

Reply Parent Score: 2