C++ Considered Harmful

My blogging will be sporadic to nonexistent for a while, as my friend Rob Landley and I are concentrating heavily on writing a paper together. The working (and probably final) title is “Why C++ is Not Our Favorite Programming Language”. It begins:

C++ is an overcomplexity generator. It was designed to solve what
turned out to be the wrong problems; as a result, it lives in an
unhappy valley between two utility peaks in language-design space,
with neither the austere elegance of C nor the expressiveness and
capability of modern interpreted languages. The layers, patches, and
added features designed to lift it out of that valley have failed to
do so, resulting in a language that is bloated, obfuscated, unwieldy,
rigid, and brittle. Programs written in C++ tend to inherit all
these qualities.

In the remainder of this paper we will develop this charge into
a detailed critique of C++ and the style it encourages. While we
do not intend to insult the designers of C++, we will not make
excuses for them either. They repeatedly made design choices that
were well-intentioned, understandable in context, and wrong. We
think it is long past time for the rest of us to stop suffering
for those mistakes.

Yes, we are attempting to harpoon the Great White Whale of modern programming languages. I’m announcing this here to give my commenters the opportunity to contribute. If you know of a particularly good critical analysis of C++, or technically detailed horror story around it, please cite. Superb apologetics for the language would also be interesting.

The paper is developing primarily from a software-engineering perspective rather than out of formal language theory. I’m particularly looking for empirical studies on the importance of manual memory management as a defect attractor (I have the Prechelt paper from the year 2000). I’m also interested in any empirical studies comparing the productivity impact of nominative vs. structural vs. duck typing.

After about 3 days of work our draft is over 600 lines of clean narrative text in asciidoc. It’s going well.