September 2013

S M T W T F S
1 234567
891011121314
15161718192021
22232425262728
2930     

Custom Text

Most Popular Tags

C++

May. 10th, 2009 11:15 pm
[personal profile] gchpaco
Almost everyone likely to be reading this is going to be totally uninterested. However due to some rash statements I made in my youth that can be found on Usenet if you are sufficiently determined, and the impending threat of the C++0x standard, I thought I might reaffirm my position on the language.

Briefly, it is the most terrible programming language anyone has seriously advocated programming in for the last 20 years.

In around 1995, when I first started programming in C++, it was a comprehensible language, in the sense that one could understand the entire language fairly readily. It had some lame parts to it, and there was some obvious omissions, but was on the whole probably slightly better than hacking an object system onto C manually. In retrospect, Objective C was probably superior, but it wasn't very well known outside of the NeXT world.

Then the ANSI committee got a hold of it. They fixed some of the omissions, for example adding templates, but in most cases the fixes were worse than the disease. In the worst cases, for example with template metaprogramming, the "fixes" were totally incomprehensible even for the most reasonable code. I am ashamed to admit that it took me a number of years to figure this out, and to develop proficiency with other languages to broaden my horizons. If you are curious, Yossi Kreinin has been maintaining a "frequently questioned answers" list, and most of his criticisms are trenchant.

And now the committee is back. C++0x has managed to make a terrible language even worse. It doesn't fix any of the preexisting problems, like the near impossibility of parsing the language successfully or the rampant abuse of implicit calls and template metaprogramming, and adds some even more creatively lame parts like making the management of the variable closure in anonymous functions the programmer's responsibility, having four string types, adding a brand new type qualifier, etc. Not content with being the most difficult language in the world to parse, it is now the only allegedly serious language in the world that requires a symbol table to tokenize.

C++ is nominally for "bare metal" programming (it is certainly inadequate for anything else), but even for that, implicit copies, implicit conversions and the general lameness of the language fight you every step of the way. The language, the language standard, and everything about it and the community is consumed with a focus on the irrelevant at the expense of the larger picture.

Sadly we do not appear to have any competent bare metal languages any more, save C (which has hardly changed at all, and is still lame, but lame in a tolerable way, in a way people can work around). I am honestly considering Ada, which for all its faults has a comprehensible computational model. Perhaps D will save us, but I doubt it; I expect to be programming in C at some point for most of my professional life. Which depresses me, but oh well.

Tags:
From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Expand Cut Tags

No cut tags

Style Credit