c++...no, really!

Back in 2003 we built yahoo! shopping on c++. The language was immature, the tools were horrible, and we were never able to reconcile our compressed schedule with the special demands c++ makes if you want stable, quality code. So for a few years I only touched c++ sporadically, checking in on the language now and then but mostly dismissing it as a mess and a relic.

In the last couple of years I have dived back in to using c++ on some personal pet projects, mostly based on the comments on the web that indicated that c++11 was a major step forward, and a sane subset now existed for application developers. It is important to distinguish the use-case of building applications - c++ has always been a great tool for bit-twiddlers, but my needs were a bit higher up the stack, more typical of tools like java and c# (whereas the bit-twiddler may merely consider it as a more modern c).

As c++11 is now a mature subset and we are on the precipice of c++14 being implemented, I now feel confident recommending c++11 as an applications development language for nearly anyone willing and able. I specifically say c++11 - the entirety of c++ is still a mess. Bjarne Stroustrup has mentioned on occasion that there is a great language hiding in the totality of c++, and I believe c++11 is that language.

In my c++11 code, RAII is the order of the day and new/delete tend to almost never appear. Most of the higher-level constructs (lambdas, iteration, etc) emerge from the c++11 spec or from the STL. As a result, I almost never have to code higher-level constructs anymore. Indeed with basic type inference, much of my code is becoming cleaner and shorter, typical with what I might compose with Go. there's even basic support for functional programming.

But most of these advantages can be delivered by java/c#/d/Go etc, so why bother? I see a number of reasons to continue with c++:

There are some things that can be improved, namely:

last update 2013-12-13