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 333384
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: I like C++
by danieldk on Sun 12th Oct 2008 07:58 UTC in reply to "RE: I like C++"
danieldk
Member since:
2005-11-18

All the C++ bashers it seems have gathered at slashdot. Just wait until this article appears there and go see the comments.


Most of the people there seem to be advocating the language du jour, or LISP, or Haskell. The fact is, these (LISP and Haskell) are not new languages, and have had many opportunities to prove themselves. Though, almost noone uses them for writing large real-life applications.

Reply Parent Score: 2

RE[3]: I like C++
by sakeniwefu on Sun 12th Oct 2008 09:11 in reply to "RE[2]: I like C++"
sakeniwefu Member since:
2008-02-26

You could argue how much of that is actually due to the greatness of the language, as opposed to just the way things are.
C is far from being the portable language it is made to be, without the preprocessor anything beyond hello world wouldn't compile on *any* machine.
However, C was tied to UNIX which was given for free with code to many universities. Then came C++ with many pitfalls, but you could keep all the C code, and people started to drift to that as the preferred OOP language from more pure approaches. Not because it was a superior language, but because it was C with classes.
With time C++ grew and incorporated, language-of-the-jour paradigms, albeit with an ugly syntax, and got the best compilers and libraries. It might be the choice that makes more sense, but that doesn't make it a good language.

Reply Parent Score: 3

RE[4]: I like C++
by danieldk on Sun 12th Oct 2008 09:35 in reply to "RE[3]: I like C++"
danieldk Member since:
2005-11-18

You could argue how much of that is actually due to the greatness of the language, as opposed to just the way things are.


Of course, the "status quo" has a large influence, but additionally I think that imperative (and OO) programming correspond more to the way our mind maps problems to code. You can see that difference between, say, a Java course or a Prolog course at a university (BTW I love Prolog, and write Prolog for food at the moment). Java is picked up very easily by nearly everyone, Prolog often takes a few weeks to get, and some people never get it. Rather than subdividing problems in steps (which is our daily manner of solving problems) it requires a programmer to map a problem to a set of predicates that can be used to prove a result (and often also vise versa). Prolog is natural for certain problems, and easier if you are well-schooled in logics. Likewise, many functional languges are natural for certain problems and easier when you are well-schooled in mathematics. But a considerable amount of programmers that churn out Visual Basic or Java code will have trouble using other paradigms, and will not need it most of the time.

For this reason, I think the current trend of mixing some concepts from functional programming with imperative languages is more interesting. Programmers can continue with what maps well with our brains, and use functional programming where it fits very well with specific problems.


However, C was tied to UNIX which was given for free with code to many universities. Then came C++ with many pitfalls, but you could keep all the C code, and people started to drift to that as the preferred OOP language from more pure approaches. Not because it was a superior language, but because it was C with classes.


C++ has developed a lot since the mid-eighties. It's not just C plus classes anymore, and if you restrict yourself to a modern subset (by using STL extensively), it's a nice and comfortable language, with an elegance that leave a lot to desire in other languages (e.g. iterators are painfully limited in most languages and most static languages have no support for generic programming beyond type erasure).

The painful thing is code that was written by programmers who still think C++ is C with some added conveniences. That code is often full of redundant algorithms (that should be replaced by STL algorithms), use of arrays, C-style character strings, global variables, no use of RAII, etc. And that is a disadvantage of C++: it allows people to be stuck somewhere between the old world and the new world, which is bad for developers from both sides.

Reply Parent Score: 6