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

Day 2 Keynote - Herb Sutter: C++11, VC++11 and Beyond

Download

Right click “Save as…”

Slides (view online)
This talk will cover:
  • Which key features in C++11 will most change the way you write code: the features that directly affect C++ style, coding idioms, and the guidance in pre-C++11 books and articles that most needs to be updated.
  • Specific guidance on each of those key features: how each one changes your code; tips on using it well; and a pitfall or two to avoid (and how).
  • Status update on C++11 adoption: how compilers, books, and programmers are doing, plus a few updates and projections.
  • What's next for C++: what's top of mind for the near future of Standard C++, and why?

Follow the Discussion

  • Yasir KhanYasir Khan

    Having read Mr Sutter's exceptional C++ books looking forward to more exceptional insights :)

  • MinMin

    Already in functional language right?
    Maybe you want to mixing c++ with functional?

  • Very interesting statistics from Herb Sutter! Wow, thanks!

  • ChrisChris

    I really liked the last part of Herb's talk where he pointed out the biggest weakness of C++ - the too small standard library - that's what I've always been thinking myself. It was nice to hear that the standard's committee has plans to work together with big companies/organizations to deliver consistent libraries that target application programming.

    :)

  • Great talk, thanks!

    I hope C++16 will have a great library Smiley

    BTW: was the C++7 package SD or HD diskettes? Did DVD-Rom edition already available? Wink

  • Great talk!

    The stuff about the standard library was particularly interesting, and I look forward to a greatly expanded library coming, as that has long been one of the biggest knocks against C++.

     

    @pierremf: As I recall, the C++7 package was on 3.5" 1.44MB floppies (a lot of them).  That was WAY before DVD-rom and even before CD-rom.  I used to have a few of those boxes taking up shelves.

  • I don't get one part of that session so far (still watching..)
    void f( const shared_ptr<widget>& spw) ...

    If you are not going to use the sharing part of shared_ptr than why not just do this:
    void f( const unique_ptr<widget>& spw) ... ?

    Was that just a bad example mr Sutter used ?

  • thesaintthesaint

    "Was that just a bad example mr Sutter used ?"

    So far I think they are both incompatible, since they do not convert into each other. So if you expect a shared_ptr and want to express that you don't need to modify it, you just as usual make a constref. If you use unique_ptr instead, nobody will be able to pass their pointers unless they already got a unique ptr. Would be something like creating a special "const" version for each of your objects and always require users to pass them instead of just using a constref to the original object.

  • Hi Herb,

    Congratulations on another greak talk.

    I think it's great how std::begin() and std::end() unify containers and built-in arrays with a clean and simple syntax.

    In addition, I think the commitee should include a global std::size() function. This would surely be preferable to the ugly ARRAYSIZE/countof macro hacks which are so commonplace. In his "Notes on Programming" Alexander Stepanov writes - "I made size into a member function in STL in an attempt to please the standard committee. I knew that begin, end and size should be global functions but was not willing to risk another fight with the committee." Thankfully the committee made begin and end global in C++11 but we are still waiting on global size.

    I would also make std::front() and std::back() global too.

    These additions would make life far easier for all programmers and shouldn't be too difficult to implement.

    I would suggest that <utility> is probably the best place for the functions I've mentioned.

    Kind regards

    Riccardo Marcangelo

    P.S

    Perhaps even a global std::at() function to provide bounds checking for built-in arrays Tongue Out.

    Example:

    int myarr [] = {1, 2, 3, 4};

    int a = myarr[4];

    int b = std::at(myarr, 4);//error!

  • Robert RameyRobert Ramey

    I've got a few observations about this presentation.

    a) The statistics on the the size of the C#/Java libraries vs the C++ standard library were very illuminating. They jive with my anecdotal feedback from java/C# programmers.

    b) Herb cited a good long list of libraries that he would like to see added to C++ and called for volunteers who would be interested in implementing them.

    c) I noted a snarky comment regarding boost libraries.

    Now my questions are:

    a) Microsoft had no problem investing (huge) resources to build a library for C# that is at least 10 times larger then the NEW C++ library. And now that it has "rediscovered (renaissance - come on!)" C++, it's asking for volunteers? Are these guys short of funds?

    b) Almost all the NEW libraries aren't new at all - they've been in boost for years. If it hadn't been for boost - they wouldn't be there! And truth is - given the above - they future one's will come from boost as well.

    c) It's bad form and not smart to bite the hand that feeds you.

    Robert Ramey

  • ChrisChris

    @Robert

    The thing is Microsoft doesn't own C#. If anything they could write something like .NET for C++ (Windows specific). MFC is not an option in today's world - it's so outdated. But I doubt they're going invest money to develop a cross-platform standard solution (why would they just do the work of others?).

  • ChrisChris

    The thing is Microsoft doesn't own C++.*

  • I don't think it's a bad thing for Microsoft to call for volunteers.  Microsoft has done a huge amount of work to aid developers over the years, and while it does have benefit to them, my personal opinion is that they have far exceeded what they needed to do.

    I think it's also great that other big companies are contributing to advancing development.  Google being a big one that comes to mind.

    We still have a long way to go though.  C++ renaissance or not, it's got a tough fight in management when they're weighing it against C# and .Net, for instance.  Yes, we all know C++ is faster.  We all know it's more efficient.  But when I think about what it's like to develop with C# and .Net, with LINQ in its various forms (which are simply brilliant), reflection, etc.., and when I think about what experience new developers are likely to have, it's hard to look at C++ as a way forward.

    That being said, I would really like to see that happen.  I'd like to see C++ being as pleasant to programming in as working in C# and .Net. (And garbage collection is NOT one of my main reasons).

  • Ben HansonBen Hanson

    @Robert Ramey

    Both Bjarne and Chandler made it very clear that it doesn't work for just one commercial company to make large contributions on their own, as no company actually owns C++. I'm also sure Herb faces many challenges pushing C++ at Microsoft as it is.

    I'm sure all the speakers are well aware of the importance of boost's contribution.

    It seems to me that Herb is frustrated that C++ doesn't have more mainstream libraries to allow the language to be (reasonably) up to date. I think it's clear he would like C++ itself to be considered mainstream again and that that can't happen without more supporting libraries.

    As Bjarne noted, it's rather like herding cats so who knows how much will change. When Bjarne started at Texas A&M University he noted how C++ had become too expert friendly at the expense of beginners. He then went on to write "Programming Principles and Practice Using C++". There is a pattern here if you look for it.

    All that said, I fully agree that it is counter-productive to get snarky with boost. I can't recall such a moment from the videos, but, yeah I did notice they weren't exactly cheering them on! I think it comes down to one of those "there's a bigger picture" comments. That's going to sound very patronising - I appologise - but there it is.

    Ben

  • felix9felix9 the cat that walked by itself

    Really good talk ! Thanks !

  • AnonymousAnonymous

    How can I watch the talk?

  • Hopeful dreamerHopeful dreamer

    @Ben Hanson
    "Both Bjarne and Chandler made it very clear that it doesn't work for just one commercial company to make large contributions on their own, as no company actually owns C++. I'm also sure Herb faces many challenges pushing C++ at Microsoft as it is."

    In the long serious run, sure. Just one commercial company will lose interest, money and/or the support and development will take its toll (support and development versus money+reward), people will get a bit smart for a short moment and move to a better language or the newest hyped up language in town, to name a few things that can happen and the language will die off.

    But it still does mean that companies wont try and leech of other languages by shady and immoral means. Humans are very good at that, sad but true.
    For example offering non-standard extensions and other lock-in features. That the company take very good care of protecting with patent laws. (Sure some features might be useful but they will come back and bite you in the butt when you switch compiler, etc..)

    Even John Carmack, him self, have said openly that patent laws hinder, stop progress, they are misused all the time so they are useless and should be removed. (http://aaronbonner.tumblr.com/post/15318032968/john-carmack-on-software-patents-1997).

    I agree with him completely. This also applies to copyright laws too.

    Shady and immoral companies like microsoft will try to lock you in.

    (winrt, wpf, c#, direct2d, c++amp)
    With bad apis that can't be structured in a portable way, open protocols that no one will really use at all because it is too windows specific for example. Oh so many ways to lock you in....

    It wouldn't surprise me if the bad api documentation on msdn is actually a way to force you into using the pay-for-support support.

    Of course when the press feels like talking about it.

    Companies will show their fake cute kitten face by for example doing stuff like these talks or by "donating" code to linux (any moron with a brain cell can tell they are not doing it out of the kindness of their heart but for profit).
    Even making a language protocol open but since it is so specific it will not be of any use to any other platform anyway.

    Making it in secret, specifically tested for windows and then release it.
    It seems more like microsoft want to control it for some reason...

    Gee! have it not occurred to microsoft that if they want to make an open implementation of something they need to get a few experts and companies together and talk about it so it fits all equally good.
    Like how c++ is done.

    Come on microsoft if you really want to be become a good company then become a transparent company. Stop with the lies and shady crap. Be totally honest for once for god sake ! No pr bullshit.

    For instance learn something from google. Make windows an open source effort like Chromium is today.
    Better yet for driver vendors to open source too. If lats say those buggy ATI-AMD drver get even buggier
    then anyone can fit it and not have to what for amd to figure out.

    A healthy community of programmers can do so so much.
    Just thinking about the possibilities makes me drool.

    Greed and the other bad urges shouldn't be listened to.

  • Where is the stream?

  • Ben HansonBen Hanson

    @Hopeful dreamer:

    - C++ is a language built out of pragmatism.
    - Bjarne has been very clear about that in various interviews over the years and in his book The Design and Evolution of C++. From his comments at the conference it is clear his position has not changed.
    - Herb is trying to support the development of C++ the best he can from within Microsoft.

    No-one has to like these facts, but that does not change them.

    Herb mentioned in a Channel 9 interview he could see good reasons for introducing a language with the same semantics as C++ but easier to parse syntax. That seems like a good idea to me. Bjarne appears to be against that as he knows how hard it is to get a new language adopted (see the D programming language for example). Chandlers comments also raises the possibility that Clang could take care of parsing C++ and could be used by user code. This looks like a proposal (hopefully) everyone can get behind.

    From your comments it looks like Microsoft is damned if they do and damned if they don't. I agree there is plenty of Marketing spin at work here, but that doesn't make the conference valueless. On the contrary there were some very interesting topics discussed. It will be interesting to see what the tone is like at the next "C++ and Beyond". There were obviously some topics that were off the agenda at this conference.

  • bill gatesbill gates

    No video?

  • CharlesCharles Welcome Change

    No video?



    It's in the queue. Should show up soon!

    C

  • CharlesCharles Welcome Change

    Video is now available!!
    C

  • The best C++ talk I've watched. Thank You and Best regards Herb!

  • dbadba

    when will vc++ 11 would release? and what's new in MFC 11?

  • BillyBilly

    I've still got by forty-four pound box of C++ Books

    and I rember with "classes"

  • Charles, Herb, or Stephan:

    I've been anticipating a Beta release of VS11 for weeks now... and we are rapidly nearing the end of February.  Is a February Beta release still going to happen?

  • CharlesCharles Welcome Change

    @MichaelPrice: Herb tells all: http://herbsutter.com/2012/02/23/vc11-beta-on-feb-29/

    Smiley
    C

  • @Charles: Yep, ended up seeing it in his Twitter feed about 8:00 PM last night!

  • petkepetke

    microsoft safe_int library!!!

  • Richard MusilRichard Musil

    I actually used Microsoft C++ - the boxed one - in my first job project and then went through VC++ 1.0, then jumped to VS 6.0 and end up with VS 2003.

    Since then I have not been anymore in C++ industry (changed job and got in love with Python), but I have to admit after seeing this talk (and I need to stress *this* in the sentences), I am again excited about C++ prospects.

    For I believe that Microsoft did quite a good job by popularizing C++ from the start, they just seemed to be marginalizing standard compliancy, doing it "theirs way". Now, it seems like Herb is putting a big effort into fixing that. Having all these new features supported by fully standard compliant compiler shipped by Microsoft is something definitely worthy. Kudos to him/them for trying.

    And very good speech, btw.

  • Nice talk, since my professional is digital image processing, I do hope that something like openCV could become part of the standard,it is a pain to build them again and again on different platforms.

  • LunaLuna

    @Hopeful Dreamer:

    >smart for a short moment and move to a better language or the newest hyped up language in town, to name a few things that can happen and the language will die off.

    Going to be tough, because if there were alternatives to C++, no one would use C++. As the speakers have pointed out, C++ is ugly, but it gets any dirty job done and it gets it done fast. If you don't need C++ don't use it. It's that simple. And if you need it you need it, at least as long as D is not mature.

    >patent laws. (Sure some features might be useful but they will come back and bite you in the butt when you switch compiler, etc..)

    So don't use them. Everybody who wants to build cross platform software knows that and should regularly compile with different compilers.

    >Even John Carmack, him self, have said openly that patent laws hinder, stop progress, they are misused all the time so they are useless and should be removed.

    One good point, they should be wiped out.

    > I agree with him completely. This also applies to copyright laws too.

    No it doesn't... We are in capitalizm after all..

    > Shady and immoral companies like microsoft will try to lock you in.

    You got it with immoral right? This is a highly subjective word. There are bigger fish to fry than Microsoft, really. Claiming Microsoft to be immoral just shows that you seem to know nothing about what is going on in the world (especially when we leave the software companies out)...

    >(winrt, wpf, c#, direct2d, c++amp)
    >With bad apis that can't be structured in a portable way, open >protocols that no one will really use at all because it is too windows specific for example. Oh so many ways to lock you in....

    So you seem to be a Linux guy after all? Interesting that you judge an API by its cross platform compatibility. Maybe you do, but you will be standing there alone. Windows is about the only platform that matters.

    >It wouldn't surprise me if the bad api documentation on msdn is actually a way to force you into using the pay-for-support support.

    Oh dear... Its getting better and better!

    >Companies will show their fake cute kitten face by for example doing stuff like these talks or by "donating" code to linux (any moron with a brain cell can tell they are not doing it out of the kindness of their heart but for profit).

    > It seems more like microsoft want to control it for some reason...

    Uhh that reason is really hard to guess!

    >Gee! have it not occurred to microsoft that if they want to make an open implementation of something they need to get a few experts and

    Hmm let's see. No it didn't, they are all stupid and you know it all!

    >Come on microsoft if you really want to be become a good company then become a transparent company.

    Now we are talking!

    >For instance learn something from google. Make windows an open source effort like Chromium is today.

    Great idea... again

    >Better yet for driver vendors to open source too. If lats say those buggy ATI-AMD drver get even buggier then anyone can fit it and not have to what for amd to figure out.

    Buy NVIDIA instead, their drivers work. That's how this world works.

    >A healthy community of programmers can do so so much.

    Yes and somebody has to get paid after all.

    > Greed and the other bad urges shouldn't be listened to.

    Maybe it is time for you to wake up. We live in the world as it is and it won't change anytime time soon, maybe never.

  • karolkarol

    it would be lovely, if MSVC after 20 or so year tradition could actually understand c++ code, so that it was a helpful development tool ... if only just for fun.

  • I am struggling to implement make_unique<T> in VS2010 and VS2011 in a good way. Do you know how to do that correctly?

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.