PDC05 – Amazing C++ futures talk

Just went to Herb Sutter's talk on C++ futures. Really rocking stuff! Check out the slides for TLN309. (Sorry, no link yet. I hope to update it when I get it.)

The first few minutes were on general improvements to the language including future ISO standard additions.

The coolest thing here at first glance is the "auto" keyword, which is a shortcut that lets you avoid typing in the whole bloody type declaration for a variable declaration when its type can be inferred from the assignment. For instance:


foo::iterator<int> i = myList.begin();


auto i = myList.begin(); // Type of 'i is inferred from the assignment

There was also a bit about lamda functions. (Yes, some of this stuff is quite parallel with upcoming C# enhancements.)

The remainder of the talk was about moving C++ toward real concurrency at a high level. The goal is to help programmers avoid all the mess of dealing with individual threads and locking. With just a few new keywords ("active" and "future") you inform the compiler what parts of your program can be done asynchronously. Think of it as making your code "message based", without completly changing the syntax.

I'm sure many of you may be doubtful from my description, and perhaps wondering what I'm smoking, but all I can say is "check it out for yourself". It only hurts your brain a little bit to grok the syntax, and it's pretty easy to see how powerful the ideas are.

Of course, all this magic will need some pretty intense upgrades to the C++ runtime. As a tools developer who plays around in the blood and guts of running code, it makes my neck hairs stand on end to think about evolving tools to this new world. I'm not doubting it can be done. Rather, I'm stepping back and reappraising the mountain to be climbed.

Comments (7)

  1. [Matt Pietrek] reports new stuff coming up in the C++ language […] Glad to read that C++ evolution is not limited to improved managed code support.

  2. Wolf Logan says:

    at the moment, the slides for that talk can be found at

  3. Norman Diamond says:

    Oops. We’d better not allow comments from anyone who remembers that "auto" already used to be a keyword ^u^

  4. Matt Pietrek says:

    Actually, I do remember that "auto" is a keyword. In fact, that very thought popped into my head in the first two seconds after I saw it on the screen.

    The MS version of C++ started using location context keywords in Whidbey, and this looks like just a continuation.

    And who knows? Maybe "auto" will be renamed.

  5. Marc Brooks says:

    I’m leaning toward ‘let’, as it has some nice nostalgia, yet avoids the connotations about C’s auto storage. I like:

    let iter = myList.begin();

    If you do too, here’s a LadyBug for it:


Skip to main content