Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Conversation with Herb Sutter: Perspectives on Modern C++(0x/11)

Download

Right click “Save as…”

I was lucky enough to catch up with Herb Sutter not too long after the FDIS announcement (Final Draft International Standard is complete).

As usual when talking to Herb, the conversation is all about C++ (well, we do talk about C# for a little while, but in the context of C++. Why?).

See below for the specific questions that were asked. You can simply click on a link to move directly to that point in the conversation. I do, however, strongly recommend that you watch the entire thing. I also recommend that you don't get used to this level of categorization in my videos (it takes a fair amount of time to do this sort of thing, so enjoy the times when I actually do this, but don't expect me to do this all of the time Smiley).

It's always great to talk to Herb and get a glimpse of what goes on in the C++ Standards Committee (which Herb chairs). In this specific conversation, it's uplifting to see how excited Herb is for the future of one of the world's most capable and widely used general purpose programming languages. C++ is a modern programming language for power and performance, but it's also a highly abstracted general purpose language for building user mode applications, mobile apps, etc. The amazing part is how C++ can provide rich general programming abstractions and also ensure that your code can run at machine speeds. We talk about this, of course.

Tune in. Learn. Go native!

1:37 -> What were the goals of the C++0x standard, at a high level?

2:40 -> Language and Library abstractions and performance (how high can you go and still be fast as possible?)...

5:23 -> C++ as an application development language (in addition to the traditional C++ is a systems programming language meme)...

07:17 -> C++0x or can we now call it C++11?

09:21 -> Standards committees and real world user representation...

10:39 -> Who comes up with the new features that get standardized (or not...)?

13:01 -> What were the goals of the C++0x standard (non-canned answer)?

14:21 -> What does Bjarne mean by C++0x being a better C++ for novice programmers?

15:51 -> Why can't C++ look more like C#?

18:50 -> At the end of the day, everything(in terms of programmer-controlled computing) boils down to memory, right?

23:12 -> What are some of the most significant new features in C++0x?

25:05 -> What can VC++ developers expect to see in terms of C++0x implementation in Visual C++ next?

27:09 -> C++ and type safety...

29:05 -> C++0x and backwards compatibility: any big breaking changes?

34:16 -> C++0x in the Standard Library...

37:01 -> Any thinking in the Committee about doing much more frequent experimental releases of C++?

39:04 -> Are their features that didn't make it into the standard that you really wanted to be standardized?

41:45 -> Are you comfortable with C++'s current state? Is it modern enough?

43:22 -> Conclusion (or Charles doesn't end the conversation when his farewell begins - where does it go from there? Smiley )

Tags:

Follow the Discussion

  • new2STLnew2STL xkcd.com

    Great vídeo. I'm excited with the next talks on gpgpu on C&B, in special I'm looking for better support in the language for aligned data. Today FDIS only have a shy proposition of only one function for pointer alignment ([20.6.5] Align).

    When you come with dealing with special case co-processor, like the gpu, its handfull have means to handle the data in and out without the need for more specific/dependant compiler stuff (at least, C++ can hide those stuff with a nice abstraction layer). It'll be more nice if you think about today and next GPU are now comming with unified memory addressing making all system and GPUs memories contigous.

  • Ben HansonBen Hanson

    Thanks for doing this interview Charles. It's always good to hear from Herb! :-)

  • Bent Rasmussenexoteric stuck in a loop, for a while

    Great interview Charles.

    The last two C++ videos on C9 has motivated me to take a fresh look at the language. Boris' demo of C++11 was amazing.

    Whatever became of LINQ or specifically Rx in C++ btw? Smiley

    I wonder what mr STL thinks about LINQ.

  • @exoteric: I'm not sure how well the LINQ library would work for C++ because extension methods don't have a good parallel when it comes to iterators, and lambda functions are far more verbose than they are in C#.

    var enumerable = foo.Select(x => x.y).OrderByDescending(y => y.z);

    VS (made as good as I could think)

    auto range = from(foo.cbegin(), foo.cend()).select([](my_struct const &x) { return x.y; }).sort_desc([](my_sub_struct const &y) { return y.z; });

    Now think of all the extra typing you'd have to do for a longer, more complex query with Join() etc. -- it's not nearly as concise.  We don't have anonymous types either, so for some queries things might need to be declared outside of the query.  What I wrote there is certainly doable, though, and would likely perform significantly better than the equivalent LINQ.

    I wish C++0x allowed shorter lambdas that didn't specify parameter types -- it could work if they boiled down to a template functor that takes any argument type.

  • petkepetke

    @PhrostByte

    >I wish C++0x allowed shorter lambdas that didn't specify parameter types.

    int x = 0;
    auto lamb = [x]() { return x; };

    Like this?

  • Adam KinneyAdamKinney Agent of Change

    My how times have changed! Who would have thought I would listen to one of Charles' C++ videos and enjoy it so much? Smiley

    Great interview and I'm looking forward to C++0x.

    "Go native, my brothers and sisters."

  • CharlesCharles Welcome Change

    @AdamKinney: Welcome home, Adam Smiley

  • ScottWinstonScottWinston

    I love the content, but something is jacked about the video. It keeps skipping bits... I hope it gets fixed eventually. :(

  • CharlesCharles Welcome Change

    @ScottWinston: The skipping is a function of your network conditions + smooth streaming (I've noticed this, too, but only inside the Microsoft Firewall...). It appears to be random. You can download the media by selecting a file format in the Downloads area next to our inline player, then play the media from your machine.

  • In the 2MB download, I kept having problems with the audio going out of sync with the video.  Pausing and restarting usually got it close again.  Not sure if that was in the video or just a playback problem on my end.  I usually don't have any playback issues.  FYI.

    GREAT video though!  It's always good to hear from Herb.

  • @petke that doesn't specify any parameter types, but it also doesn't have any parameters!  I meant to specify parameters, but leave their types inferred.

    Basically instead of

    [](int i) { return i * 2; }

    You would have:

    [](i) { return i * 2; }

    Which would generate a functor that takes a parameter 'i' of any type -- equivalent to this:

    struct func
    {
       template<typename T>
       auto operator()(T i) -> decltype(i * 2) { return i * 2; }
    }; 

    These are called polymorphic lambdas.  They were discussed for C++0x but dropped as it was decided to be too complex to implement in a way compatible with Concepts (which were themselves removed).  I'm hoping to see it in a future standard.

     

  • Richard Anthony HeinRichard.Hein Stay on Target

    , Charles wrote

    @ScottWinston: The skipping is a function of your network conditions + smooth streaming (I've noticed this, too, but only inside the Microsoft Firewall...). It appears to be random. You can download the media by selecting a file format in the Downloads area next to our inline player, then play the media from your machine.

    Hey Charles, that's what I thought at first, but I don't think that's the problem this time.  It seems to be an encoding issue.  Check around 5:45-5:60 for an example of the skipping.  It happens a few times in this video.

  • CharlesCharles Welcome Change

    @Richard.Hein: Thanks Richard. I will look into this. (I didn't notice it the first or second time I watched this, but apparently I need to watch it again Smiley )

    Charles

  • Richard Anthony HeinRichard.Hein Stay on Target

    @Charles:  That's so weird, I just tried it when I posted my last reply, and it skipped ... but just now, it was fine.  Perplexed  Maybe it isn't the encoding.  I have no idea now.  Also, 5:60 ... duh, I mean 6:00.

  • CharlesCharles Welcome Change

    @Richard.Hein: Are you watching it in the inline player or a downloaded media file (which format?)?

  • Richard Anthony HeinRichard.Hein Stay on Target

    @Charles:  The problem only appeared in the inline player.  It was so bad the other day, I just downloaded the high quality WMV.  It seems fine now. 

    The weirdest thing about it, is that I went and checked at a specific spot that I knew had the skipping problem.  I remembered it because I had decided to give up on the streaming at about 6:30 into the video and download it, because "dollars to donuts" has a bad skip before and right after it, and I couldn't understand what Herb was saying.  I tried rewinding, playing it again and again, but no good.  So I switched to the downloadable WMV.  So today when I went to check if it was intermittent, the skipping was in the exact same place.  However, now I get a nice smooth "dollars to donuts"  and context ... Wink.

  • Richard Anthony HeinRichard.Hein Stay on Target

    Of course, I don't know how the caching of the streaming works ... so maybe it was cached?  But for a couple of days, and just expired earlier?? 

  • felix9felix9 the cat that walked by itself

    I just noticed the 'C++ Renaissance' and 'going native' phrases in a microsoft job post, so its actually an 'official' slogan now Smiley :

    The C++ Renaissance has begun! To be competitive in tomorrow’s world of software and devices developers are increasingly (re)turning to C++ to differentiate their products from the rest and create experiences never imagined. When it gets right down to needing to maximize performance for NUI experiences or building the next great game, “going native” is the only answer.

    https://careers.microsoft.com/JobDetails.aspx?jid=40064

  • CharlesCharles Welcome Change

    @felix9: The power of Channel 9 - and Mohsen's penchant for metaphors Smiley

    Charles

  • Bent Rasmussenexoteric stuck in a loop, for a while

    Is there a C++0x feature matrix or VS 2010 and a planned C++0x feature matrix for the upcomming VS 2012?

  • CharlesCharles Welcome Change

    @exoteric: Not that we can share with you Smiley

    You'll need to wait for when the C++ team makes their plan public. VS.next is in private development mode (which means the VS team is not sharing any details about the next release publicly).

    In terms of VC10 and C++0x implementation, please see:

    http://blogs.msdn.com/b/vcblog/archive/2008/10/28/lambdas-auto-and-static-assert-c-0x-features-in-vc10-part-1.aspx

    http://blogs.msdn.com/b/vcblog/archive/2009/02/03/rvalue-references-c-0x-features-in-vc10-part-2.aspx 

  • Sorry in advance but i just can't keep quiet anymore  Mad
    Even if you do ignore me at least its public.

    Charles do not even think of removing this post, people have the right to hear how it really is beside this is constructive criticism at its best so please listen this time and let the right people know how they failed so they can begin thinking of how to fix it (if they even can, please surprise me! )

    Warning Soapbox on:

    'smooth streaming' should be renamed to something more accurate like 'crappy streaming', 'laggy streaming', 'jerky streaming'....

     

    First it refuses to use the high quality version and we it finally decides to use the high version it decides to switch randomly to low and then high again, Of course using the rewind button also makes it flip to low again. Even pausing the video for a short time will cause it to switch to low. Going to windowed mode (ex to look up a thing) will also make it switch to low.
    When in low mode it takes ages for it to decide to which to high. 

     

    And now i've been experiencing this new "by design" feature that makes the videos skip / jump over sections of the video.

     

    The only thing i can say what the fork !

     

    I knew from the beginning that this streaming thing was made so you (microsoft) could cut down on the bandwidth costs. I also expected the users to get the bad side of the deal like normal but come on aren't you going too far this time ?

     

    I've hated this streaming thing from the beginning, i want the older player back that actually worked. That played the high quality version no matter what, it didn't matter if it was in fullscreen or in windowed normal mode, pausing affect it, it just worked. The only thing i like about this new player is the rewind button. Everything else is just crap and my advices of how to improve the player at least a bit have been ignored like normal, what a "good" feedback system you have.
    (Yes i was polite when giving those advice's, like that would have help...)

     

    I know there's an option 'Video Playback Preference' to which but it bloody doesn't work!

    Some videos plainly refuse to play others are forced to low video quality even thou a high quality version is available. So yet again microsoft is forcing the user, this time by providing the illusion of choices that doesn't work in the end which in turn will cause the user to switch back the setting, to something that will benefit microsoft and give the user lots of pain and suffering yet again.

     

    This is became really old really fast a few years, when are you going to stop trying to pull bullshit like this ?

    "Good user experience" hah! bullshit

     

    Silverlight doesn't work, and the other stuff you dog-food doesn't work either.

    The only thing it do provide is an very good example of how really bad your products really are. They are so bad that not even microsoft employee's with internal information access can make it work. God i just can not understand how people would use this crap.

  • new2STLnew2STL xkcd.com

    @Mr Crash: well, smooth stream works perfectly, I've tested it on other sites and video sources and it works perfectly. Here on Ch9 what I see is a huge limitation on their bandwidth (by the huge success of newly videos).

    What I've tested is watch the same video on weirdo hours (for that I can take advantage in be -8hours diff-time from the servers) make it plays nice and hi-res, any video. But on peak hours or when Ch9 throws many cool videos at once (this week have had 5 videos , 3 on same day) their bandwidth suffers a lot and the load balancing down everyone to floor.

    I know how this type of constraint is frustrating, believe me, I've worked with video conferencing and e-learning (video and audio part) for 5 years and I know how any hiccup are unpleasant, but its  a limitation of their bandwidth or any of the hops that carry the video stream until reach you (some companies are having the bad habit of throttling speed after detecting torrent and video stream headers, or when some IP source is "abusing" their bandwidth)

    Please lets make effort for Channel9 get more bandwidth instead of flaming the silverlight, wicht is working very well while webSockets is not ready Angel

  • CharlesCharles Welcome Change

    @Mr Crash: There's nothing wrong with speaking your mind here. Never has been... That said, I'm not sure why we're having this dialog on a video thread about modern C++ with one of the language's titans and chair of the ISO C++ committee... Can we move this to the Feedback forum please? Let's keep the conversation on this thread about C++0x/11. Please.

    We are aware of the random streaming glitches and we don't think the issue is just related to Silverlight Smooth Streaming technology (it's probably more complicated than that...). Duncan and team don't sit around on their hands - they're busy investigating, isolating problems, designing solutions. We'll get this right. I know that on pieces like this with direct links to time points in the video the problem becomes painful (since the links don't apply to downloaded media (though I did provide the actual times - you just can't click into them in your favorite media viewing client, but you can navigate to the points in time manually)).

    Thanks for your understanding. Please continue this conversation in our Feedback forum - not here.

    C

  • ERandall NelsonERandall Nelson

    Thank you, Charles. My first Channel 9 viewing experience was well worth the discovery. I'm one of those novices you guys talked about. Teaching myself C++/Windows API programming, it's nice to see my chosen language 'has legs' and this interview was a definite morale boost. Please convey my appreciation to Mr. Sutter.

    ERandall Nelson

  • Richard Anthony HeinRichard.Hein Stay on Target

    @ERandall Nelson:  Wecome to Channel9. Smiley  If you liked this interview, you will probably like the Rock Hard: C++ Evolving session from DevDays, that goes over some features and presents demos of C++0x.

     

  • IvanIvan

    Bad interview IMHO, no hard questions like:
    -why did it took you 10+ years to update the standard.
    -why didnt you update the simple stuff (regex, static assert, >> ) 5 years ago in "minor" release.
    -why there is no boost_filesystem like functionality
    -why there is no for eg char16_t string?
    -do you think that for eg. MS and Google could say:"Look we spent tons of $ on building c++ applications it is in our best intrest to join forces and invest a couple of millions and redesign c++ from scratch, abandon all compatability, leaving it native, and all that stuff, but building on 30 years of experience".
    -if you consider how hard is it for users to make thtread safe containers dont you think that standard should implement basic ones(queue, vector, map, multimap,set...)
    -why arent shared objects(.dll in win and .so in UNIX) pushed into standard so that compiler automatically can create .so or .dll depending on the OS.
    Again this aren't the smartest question in the world, but interview should have hard questions, and if Herb tries to avoid it (like he did when asked about concepts) you should ask specific questions.


  • Herb SutterHerb Sutter

    @Ivan: Most of those things were just off-topic, and we had only so much time.

    Short answers follow:

    > why did it took you 10+ years to update the standard.

    It took 13 years because the committee intentionally took a five-year break after shipping the first standard to let implementations catch up and stabilize (I think I alluded to this). This was a good idea because the C++98 standard included lots of stuff no one had implemented yet, and was far out ahead of existing practice, so it wouldn't have been good to immediately start adding more language features.

    We did ship C++03 (2003) which was a "service pack" of bug fixes and clarifications.

    We then shipped a Technical Report on Library Extensions (aka Library TR, or TR1) which included regex, hash-based containers, smart pointers, and lots more. This was published in 2005 or so, and although non-normative it was widely implemented including in Boost, Visual C++, and other implementations.

    After that, we aimed for 2008/09 (hence "C++0x") for a revision of the standard that would include another round of language extensions, but had feature creep problems and so had to reduce scope, such as cutting concepts which had unfortunately already consumed a lot of time.

    > why didnt you update the simple stuff (regex, static assert, >> ) 5 years ago in "minor" release.

    We did that for many features, including regex and hashed containers and more, in the Library TR I mentioned above. See <a ref="http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=library+tr1">library tr1</a> for some links.

    > why there is no boost_filesystem like functionality

    Because no one proposed it for C++0x. (It was proposed for post-C++0x and is already approved, so it'll be one of the first things we add to our next piece of work, which will likely be another Technical Report like the first one which was very successful.)

    > why there is no for eg char16_t string?

    Do you mean something other than std::wstring? That has been in the standard since the mid-1990s.

    > do you think that for eg. MS and Google could say:"Look we spent tons of $ on building c++ applications it is in our best intrest to join forces and invest a couple of millions and redesign c++ from scratch, abandon all compatability, leaving it native, and all that stuff, but building on 30 years of experience".

    That isn't a C++ question. :) Also, I can't speak for Google. Rob Pike seems to have some ideas here, although note that Go is not a "systems programming language" in the same generality- and performance-oriented sense as C++ is; they mean something different when they use that term.

    > if you consider how hard is it for users to make thtread safe containers dont you think that standard should implement basic ones(queue, vector, map, multimap,set...)

    Yes, and I am pushing to get those into the next TR, now that we have threading in the standard at all.

    > why arent shared objects(.dll in win and .so in UNIX) pushed into standard so that compiler automatically can create .so or .dll depending on the OS.

    There were two efforts along those lines"

    1. Pete Becker championed some work in the early 2000s to try to provide exactly this, but at the end of the day it didn't get consensus because it seemed to the participants that the differences between Windows and Linux (and other) shared library approaches were sufficiently fundamental and incompatible that it was too hard to provide a unified standard interface that would do justice to both/either of them.

    2. Nevertheless, as I mentioned briefly in the interview, Daveed Vandevoorde championed a "modules" proposal to add such modules to C++0x. It didn't get consensus because it was too experimental for standardization in the C++0x timeframe, and so ended up being an early cut in our first round of scope cuts in fall 2006, but well may get picked up again.

    > Again this aren't the smartest question in the world, but interview should have hard questions, and if Herb tries to avoid it (like he did when asked about concepts) you should ask specific questions.

    I wasn't trying to avoid concepts, which I've talked and written about in detail before, including in my July 2009 trip report covering the Frankfurt meeting where they were cut (see <a href="http://herbsutter.com/2009/07/21/trip-report/">http://herbsutter.com/2009/07/21/trip-report/</a>). It's just that concepts aren't in C++0x, this was mainly about C++0x, and it was a distraction for this topic.

    But I'm happy to answer hard questions, and you've given me an idea... I've just started a new post on my blog at <a href="http://herbsutter.com/2011/05/17/c9-questions/">http://herbsutter.com/2011/05/17/c9-questions/</a> where anyone can post any question(s) you'd like me to answer, hard or soft or big or small (just not too bizarre or personal please :) ). To make sure that we can focus on those that matter to the most people, please return often to vote your and others' questions up/down. Then we'll take the highest-voted questions as the topic for another C9 interview, say as many as we can get through in 30 min or so.

    How does that sound?

    Cheers,

    Herb

  • CharlesCharles Welcome Change

    @Herb Sutter: Awesome! See, Ivan. Now YOU can ask the hard questions Smiley
    C

  • IvanIvan

    WOW... I got an answer from Herb Sutter, for me it's like "Lady Gaga writing back to a fan" for a normal :) person.
    I'll post the follow up question about char16_t string there, hope that people will upvote it.
    P.S. I know that I sounded a bit rude, but the thing is that stuff like interview with Herb Sutter is really rare stuff and I felt that some important stuff wasn't being mentioned.

  • poohpooh

    The video is interesting, but the over-editing put me off and I had to stop. Every other sentence Herb utters is truncated, which often makes the interview hard to follow and sometimes to the point that it doesn't make sense or is even incorrect. Please don't do that.

  • Charles,

    Nice conversation, there is so much involved in C++ that I never knew.  

    small request, if a video doesn't have any whiteboarding, and you can just listen, can you tag the video with an audio-only tag?

    Keep up the good work!

    Thanks!

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.