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:
before:
foo::iterator<int> i = myList.begin();
after:
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
- Anonymous
September 16, 2005
[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. - Anonymous
September 16, 2005
at the moment, the slides for that talk can be found at http://216.55.183.63/pdc2005/slides/TLN309_Sutter.ppt - Anonymous
September 16, 2005
Slides are now available here:
http://commnet.microsoftpdc.com/content/downloads.aspx - Anonymous
September 19, 2005
Oops. We'd better not allow comments from anyone who remembers that "auto" already used to be a keyword ^u^ - Anonymous
September 22, 2005
The comment has been removed - Anonymous
September 23, 2005
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:
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=f181f2bd-6348-410e-b010-92349da4f80b - Anonymous
June 16, 2009
PingBack from http://lowcostcarinsurances.info/story.php?id=7655