Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Stephan T. Lavavej on the future of C++

Stephan T. Lavavej on the future of C++

Stephan Lavavej poses a great question: "What is the future of C++?" 

This question has a finite horizon.  No language can possibly be eternal, right?  (Although C is certainly making a good run for it.)  I don't expect C++ to be vibrant in 2107, or even 2057.  50 years is an almost incomprehensible span of time in the computer industry; the transistor itself is turning 60 years old this year.  So when I ask, "what is the future of C++?", I'm really asking about the next 10, 20, and 30 years.

Stephan provides historical references to a recent paper released by Bjarne Stroustrup and an interview with Alexander Stepanov on the C++ machine model

Then he poses while C++ as a language has maintained a focus on performance the underlying hardware is now in flux due to engineering limitations as outlined by Herb Sutter in 2005 in a paper on the movement towards concurrency and how languages must evolve to meet these new challenges.

In Stephan's opinion:

Among C++'s biggest core language changes will be variadic templates, concepts, and rvalue references.  The first two will make writing templates a lot more fun.  That's great, because templates are a powerful way to produce highly efficient code.  And the third will address one of the flabbiest areas in C++03 - its tendency to make copies of values.

Jared, a commenter, agrees with Stephan but is not confident .NET will survive as long as C++:

Well said, but I do believe C++ will still be kicking in 2057.  In fact I think it will outlive .NET.   (I think .NET will eventually, yet again, be marketing-driven into a new technical entity, but I digress).

Jim Grow disagrees feeling managed C++ has not received the attention of other .NET languages:

It looks like C++ will be put into a smallish corner.  This will be the place a few holdout will run to hide while the rest of the world builds .NET code.  Companies and developers will only go there if it is the last choice because it doesn't fit with the modern tool sets.  Its really too bad because C++ could have been a really nice language for .NET.  Sadly someone had a motive to make sure .NET developers where using some other language.

 Olivier Giroux worries about future C++ memory model assumptions:

The performance issues that dominate with 100+ threads on a single die are very different from those that dominate with 2~8, though you get to see the trend starting there.

With enough threads running the instructions become free, and you'll be lucky to fill the instruction slots you already have.  Very quickly Amdahl's law pins  you at the interface to memory.  In the past we fended it off with L[N] cache designs, but these need more spatial coherence than you're likely to see on average with a super-threaded workload.

So the largest threat to C++'s position in performance is probably hardware that cannot easily be programmed using the memory model assumed by C++.

So how do InfoQ readers feel about the future of C++ as a language?  Is C++ at a tipping point or are its glory days over?

Rate this Article