Monday, April 27, 2009

ACCU confernece: The Future of C++

As you might expect from the ACCU conference there was plenty of C++. But the language was far from the only one in town - there were at least 8 others. This year most of the C++ sessions looked at the forthcoming C++ 200x standard. It now looks unlikely that this will be completed this year so we might want to rename is C++ 201x. As to exactly when, well, your guess is better than mind.

Some years ago I said that this standard would be “the longest suicide note in history.” I stand by this comment - indeed I found other people repeating it, either to agree or disagree.

I say this because I believe the language is now so big to be un-teachable, and possibly unusable. I don’t see how making the language so much more complicated will encourage more people to use it, indeed I see the reverse. And I believe this standard will only add to the confusion around C++.

I’ve also been saying for the last few years that we have seen the last generation of C++ programmers. A recent meeting made me rethink this position - a recent graduate who has to learn C++ for his first job. But then, at the conference and without promoting from me, Andrew Holmes said he didn’t think anyone would learn C++ after 2006 so maybe I’m not completely wrong.

Anyway, learning the new C++ will only be an academic exercise for the next decade. It will be a while before any compiler implements it and much longer before a substantial code base exists to work in.

I believe things need to be removed from language to simplify it. So I have also been suggesting for a while - to anyone who will listen - that C++ should split in two. There should be one backward compatible version with minor fixes and enhancements. A second version should break backward compatibility, remove features, fix elements of syntax and make it easier to learn.

After speaking to several people at the conference I believe this has now happening. Not officially but by defacto.

Walter Bright’s D Programming Language is gaining traction. This is the simpler C++ which I - and others - have been looking for. Unfortunately I didn’t get to talk to Walter at the conference, I hope he will return next year with more D and I will get the chance to speak to him. (Walter, if your reading this, can you please present D in 180 minutes?)

Its not a forgone conclusion yet but I hope D will succeed. Actually, I think Oracle’s purchase of Sun could help here. Oracle are quite clear why they are buying Sun: to get Java. This means things will change in the Java world - if only because Oracle want to make money out of Java.

Its too early to tell yet how this will plat out but I expect to see many people rethinking their languages choices as Oracle’s plan plays out.