October 2010


In July I suggested I might give a C&B talk about Move Semantics in C++, including their underlying implementation machinery, rvalue references.  Rvalue references are also used to implement perfect forwarding, and recently I realized that you can’t really take full advantage of move semantics without using perfect forwarding, too, so that’s also in the talk.

Over the summer, the Standardization Committee modified draft C++0x to make move operations “special,” which means they will be automatically generated by compilers under “appropriate” conditions, and then people started asking me questions about the interaction of move operations and threading, move operations and exceptions, and the kinds of classes for which move operations make sense.

The overall landscape involving move semantics turns out to be more complex than it initially appears, and in my first session at C&B (which is currently slated to be the first session of the event), I’ll do my best to explain the lay of the land.  There’s a lot of material to cover, so it’ll be a double-length session with much technical meat.  Don’t worry, though:  there will be a break in the middle, and once we’re done, it’ll be time for lunch :-)

My presentation will be finalized within the next few days, so if there’s some aspect of move semantics, rvalue references, or perfect forwarding you’d like to see me address, please comment on this post or send me email ([email protected]).

Scott

Lambdas, Lambdas Everywhere

We’ll be posting abstracts (summaries) of the C&B 2010 sessions over the coming days. Below is the first, for my talk on “Lambdas, Lambdas Everywhere.”

This is a brand new talk. I delivered a ‘sneak peek’ preview of a subset of this material in conjunction with the ISO C++ standards meeting in Switzerland two months ago, but the full talk will be given publicly for the first time at C++ and Beyond.

Historical trivia: This talk exists because Bjarne Stroustrup asked for it. Bjarne knew that I felt lambda functions were a game-changing feature that would have a pervasive impact on C++ coding style across many domains, and he asked me to write up the examples demonstrating why. This talk is the result.

Here’s the abstract:

Why care about C++0x lambda functions? Syntactically, they are nothing but sugar for function objects. However, they are an essential and enabling sugar that will change the way we will write C++ code more often than most people realize.

This talk will cover what lambda functions are and how to use them effectively, including how lambdas touch many wide-ranging kinds of code — from their convenience when writing concurrent and scalably parallel code, to how they stand to revolutionize STL usability and programming, to how they enable such small conveniences as local functions and local variable initialization.

Note that lambda functions, although futuristic, are not a far-future feature. They are available today in several shipping C++ compilers, including Intel C++ 11, Microsoft Visual Studio 2010, and gcc 4.5. The future is now. Come find out how this powerful feature affects you and your code.

About the speaker: Herb Sutter is an architect on the Windows C++ team at Microsoft and the chair of the ISO C++ standards committee. He is the main designer of lambda functions in Visual C++ 2010 and their integration with the VC++ Parallel Patterns Library, and is partly responsible for the design of lambda functions in the C++0x standard, notably their final syntax.

We’re pleased to announce that public registration is now open for the overflow “Encore” showing of C++ and Beyond. The deadline for early-bird discount registration is November 14, but if you want to make sure you get a place it would probably be good to register sooner (the first showing sold out even before the early-bird period ended).

If you weren’t able to get into the first one before it sold out, here is a second chance to attend the same event with the same speakers; the same location; and the same solid technical program on C++ and directly related technologies, including many new and up-to-the-minute-current talks that have never before been presented publicly anywhere else. The only thing that’s different is the date: C++ and Beyond Encore runs from December 13 (evening) through 16, 2010.

We look forward to seeing many of you in the beautiful Pacific Northwest later this year!

« Previous Page