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 333310
To read all comments associated with this story, please click here.
c++
by _LH_ on Sat 11th Oct 2008 17:42 UTC
_LH_
Member since:
2005-07-20

The bad thing about C++ is that it's way too easy to program fugly code which no one can read now maintain. If - on the other hand - you have a bunch of good and experienced coders and software architects, you usually end up having code which looks very similar to Java (except that you can sum complex numbers with '+' operator) but is fully native and can be fine-tuned for performance where it really matters. If you don't believe this, just look at some Qt4 programs.

Reply Score: 9

RE: c++
by bnolsen on Sun 12th Oct 2008 05:22 in reply to "c++"
bnolsen Member since:
2006-01-06

Saying good c++ code ends up looking like java is kind of offensive...I take strong offense to that.

About the only way I can see c++ code looking like java is if the project & code base gets grossly over engineered.

The biggest valid complaints I've seen about c++ is that it allows for far too many different dialects to exist, all based on what company you work for or who you work with (of course the dialect I used is the best :-p )

Reply Parent Score: 2

RE[2]: c++
by ashigabou on Sun 12th Oct 2008 07:35 in reply to "RE: c++"
ashigabou Member since:
2005-11-11


The biggest valid complaints I've seen about c++ is that it allows for far too many different dialects to exist, all based on what company you work for or who you work with (of course the dialect I used is the best :-p )


This is an extremely strong disadvantage in the context of what ESR is saying: open source programming. It is true that you can alleviate the over complexity of the language in a strongly controlled environment, with one coding style, the do and don't. But in open source programming, this becomes an almost fatal flaw. Only really big projects can deal with C++ (KDE, mozilla).

Also, C++ does not tend well to code reuse; this is linked to the previous point , since it id difficult to reuse the code using one subset in a project using another one. It is difficult as hell to interface to other languages because of its complicated linking model, templates can't be used either as a library without a lot of boilerplate. It is true that STL-like containers are useful, but it comes at such a high price that I am not so sure anymore a plain C library is not better in most cases.

Reply Parent Score: 2

RE: c++
by l3v1 on Sun 12th Oct 2008 09:04 in reply to "c++"
l3v1 Member since:
2005-07-06

The bad thing about C++ is that it's way too easy to program fugly code which no one can read now maintain.


That's not the fault of the language, it's the fault of the coder. Yes, I strongly believe that. F*cked up coders can generate unbelievably unreadable and unmaintanable code in whatever language.

Up to this day I code all my algorithm code in c++ (mostly computationally highly intensive image and video processing code, some heavily multithreaded) and if I can choose, then I choose it always before any other language, java and c# included.

Some say it's bad, because it's easy to make mistakes. Well, learn to avoid those mistakes then, fools, and believe me, those good practices will help you in the long term, and big time.

Reply Parent Score: 5