InfoQ

News

Stephan T. Lavavej on the future of C++

Posted by James Vastbinder on Sep 14, 2007 12:00 AM

Community
.NET
Topics
Language
Tags
Concurrency,
Microsoft,
C++,
Languages

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?

3 comments

Reply

C, C++, Java/C# by Stefan Tilkov Posted Sep 14, 2007 11:09 AM
C++ Future... by Alejandro Espinoza Posted Sep 14, 2007 1:05 PM
Re: C++ Future... by shashwat chandra Posted Sep 19, 2007 12:51 AM
  1. Back to top

    C, C++, Java/C#

    Sep 14, 2007 11:09 AM by Stefan Tilkov

    IMO, C++ now targets a problem area somewhere between C and Java/C#, and I can't really see why anyone would not select one of these instead of C++ unless there's already a huge code base that needs to be maintained.

  2. Back to top

    C++ Future...

    Sep 14, 2007 1:05 PM by Alejandro Espinoza

    I personally think that C++ still has a long time to live. .Net is not a direct competitor to C++ and neither is Java. There has always been a place for C++ developers... Java has been here for some time now, and C++ still prevails. I do know that the percentage of c++ developers will be reduced but will prevail.

  3. Back to top

    Re: C++ Future...

    Sep 19, 2007 12:51 AM by shashwat chandra

    I too personally think that C++ has long way to go.. C# is just an wrapper around C++ thats what i think.Languages like C# will come and go but the base remains the same.

Exclusive Content

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.

Architectures of extraordinarily large, self-sustaining systems

Can a system that is so large it cannot be comprehended be "designed" in a conventional sense? The foundations of computing are about to change. In this talk, Richard P. Gabriel explores why and how.

Using Ruby Fibers for Async I/O: NeverBlock and Revactor

Ruby 1.9's Fibers and non-blocking I/O are getting more attention - we talked to Mohammad A. Ali of the NeverBlock project and Tony Arcieri of the Revactor project.

Agile and Beyond - The Power of Aspirational Teams

Tim Mackinnon talks about the aspirations behind the Agile principles and practices, the desire to become efficient, to write quality code which does not end up being thrown away.

Concurrency: Past and Present

Brian Goetz discusses the difficulties of creating multithreaded programs correctly, incorrect synchronization, race conditions, deadlock, STM, concurrency, alternatives to threads, Erlang, Scala.

ActionScript 3 for Java Programmers

Often the hardest part of changing technologies is language syntax differences. This new article provides Java developers with a transition guide to Actionscript which forms the foundation of Flex.

Neal Ford On Programming Languages and Platforms

Neal Ford talks about having multiple languages running on one of the two major platforms: Java and .NET. He also presents the advantages offered by Ruby compared to static languages like Java or C#.

Future Directions for Agile

David Anderson talks about the history of Agile, the current status of it and his vision for the future. The role of Agile consists in finding ways to implement its principles.