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

GoingNative 1: VC++ vNext, CRT, C++ and Beyond

Download

Right click “Save as…”

We're back with the second installment of C9::GoingNative and we have a great show for you! Thanks for being patient and for all the excellent feedback and support for GN! We are listening to you and will continue to adjust the show based on your feedback (note the background—less motion, but not completely void of animation). Early on, we received a request to spend some time on the CRT. Here, we do just that. Mahmoud Saleh is the STL of the CRT (now, in this case STL refers to both Stephan T. Lavavej—our hero—and of course it also means Standard Template Library, the code Stephan maintains and improves. Mahmoud maintains and improves the CRT (C Run-Time Libraries)).

Diego demos some nifty new VC++ IDE features arriving in vNext. You can learn more about these new features in a recently published article by Sumit Kumar, program manager in the Visual C++ team. Much thanks to the VC++ team for pushing the IDE forward.

Charles and a few fellow C++ and Beyond attendees share perspectives on this great event for C++ developers. And looking forward, you'll see some great C++ and Beyond content on C9 over the coming months and well, yesterday: Watch the C++ and Beyond C9 interview with Herb, Scott, and Andrei.Smiley
.
Table of Contents(click time code links to navigate player accordingly)

[00:00] GoingNative();
[01:58] Diego demos some VC++ vNext features
[10:20] Charles and Diego briefly chat about Diego's demo
[12:37] Meet Mahmoud Saleh and learn all about the CRT
[37:06] Diego and Charles: CRT debriefing, C++ and Beyond
[41:29] gn.~GoingNative();

We really want to hear from you, so please tweet feedback to @C9GoingNative (follow us!) and send your requests, ideas, complaints, praises, hate mail, and love letters to C9GoingNative at hotmail com. We will read and respond to all messages! That's how we roll, brothers and sisters. If you are a Facebook user, then please join our C9::GoingNative Facebook group.

Go native!

Tags:

Follow the Discussion

  • felix9felix9 the cat that walked by itself

    I want more refactoring support in VC11, its the killer feature of VAssistX beyond better coloriziation and intellisense.

  • The CRT talk with Mahmoud Saleh is really interesting, and it looks like we could spend an entire hour (or even more) talking about the design and the possibilities of the CRT. Charles, any thoughts on a lecture series or a GD episode on the subject?

  • What is going to happen to C++/CLI with the VC11 ?

  • Charles, are you and Diego coordinating wardrobes now?  Wink

    The VC.next improvements look nice.  My biggest issue with the VC IDE by far is speed.  The IDE runs way too slowly, particularly the Intellisense.  Intellisense kind of loses its value if you have to wait for it to catch up.

    I would like to second the request, if Mahmoud is willing, for an Advanced CRT lecture series or at least a good Going Deep.  It looks like there was more material from that session with Mahmoud that got cut out?

    All this talk about /GS has got me thinking that we are overdue for a Going Deep segment with Louis L'exception Lafreniere.  How about it Charles?

    Good show guys.

  • CharlesCharles Welcome Change

    @ryanb: Yes. Mahmoud's segement was in fact edited down from a longer conversation (deep(er) stuff was not cut out, however - we wanted to keep this at a medium level of complexity to make the content suitable for a wider audience and not ship a GN that's over an hour long!).

    I love the idea of an Advanced CRT Going Deep or Lecture Series. This will depend on how Mahmoud feels about standing in front of a camera and talking to it (in the lecture case) or if he wants to dig in deeper in a conversational piece for GD.

    What I would recommend and encourage, given the rather large scope of CRT, would be to send us what you want to know, specifically, what questions you'd like to ask Mahmoud, what advanced topics you want to learn, etc.

    Let us know!

    Louis no longer works on the C++ compiler team and I'm not sure what he's working on today relates to what you want us to talk to him about (he's still a native dev, of course...).

    Louis on /GS and /GS++: http://channel9.msdn.com/shows/Going+Deep/Louis-Lafreniere-Next-Generation-Buffer-Overrun-Protection-gs/

    More Louis: http://channel9.msdn.com/Tags/louis+lafreniere

    C

  • One trivial(?) thing that springs to mind when CRT is mentioned. I often find myself inside it when doing something with a native project and then there's a ton of those CRT etc files open. As a C# dude I'm used to quickly press Step In to traverse through a code I'm trying to understand. With native code I end up in CRT code or somewhere immediately with two presses of F11.

    Why doesn't C++ have "Just my code" so I can Step In through my code quickly without actually ending up inside CRT or other MS code? (Maybe Shift-F11 or something to step inside if you really want to, without having to go into options to change the setting!)

     

    With the same effort that goes to recognizing what is a CRT function (to avoid stepping in), those could be maybe optionally shown in different shade of color to tell when you can press "shift-f11" to step in.

     

  • felix9felix9 the cat that walked by itself

    To me ,CRT is in a kinda interesting position. I try to avoid calls into it directly in some scenario, while prefer it some others.

    for example, I know I should never use CreateThread API in a normal programe because _beginthreadex does some extra work needed by CRT, but if I'm using some other frameworks I should always use higher-level stuff like AfxBeginThread or so because it might does more extra work needed by the framework itself.

    another example, always use C++ new/delete, never use malloc and friends directly.

    For strings, I use std::string, CString or simple TCHAR array with sprintf_s in different scenarios,

    For file/file system operations, I prefer Windows API, seldom used fopen/fclose.

    but for time stuff, I do prefer time_t Smiley

    I use memset and ZeroMemory just randomly Tongue Out

    so its really complicated, is there a guide for when to use what ? Perplexed

  • What is up with that range-for snippet?  The snippet should read:

    for (object var : collection_to_loop) { }

    instead of

    for each (object var in collection_to_loop) { }

    see http://en.wikipedia.org/wiki/C%2B%2B0x#Range-based_for-loop

     

    Also, the one C&B attendees comment about lack of support for template aliasing in compilers.... Clang (at least top-of-tree) had it before the conference started.

  • CharlesCharles Welcome Change

    @MichaelPrice: Are you sure Clang supports using for templates? It could be that it didn't when we filmed the interviews, but it seems to me that Clang is making good progress in C++11 support, but is not the leader as far as I can tell (not that this is some sort of race...). Even Andrei mentioned that nobody supports template aliasing yet during each of the talks where he employed it... Either way, Clang is making some really good progress for sure.

    C

  • CharlesCharles Welcome Change

    Great news -> Mahmoud wants to lecture on CRT topics Smiley Stay tuned to C9 for this. Thank you, Mahmoud!! You rock.

    C

  • GlenGlen

    * Great video charles.
    * Loved the new ide features in the IDE video.
    * Any chance of a vs2010/vs.next performance video/article? Without such an article my worry is that new features wont get appreciated enough as they could while people are worried about performance. But I like what I see so far.
    * The mscrt section was a little dull for me, but great idea to solicit feedback on what would be "not dull" on that subject (will think on that).
    * Charles, the "beginner" vs "advanced" topics issue is tricky. You'll want to provide both, but finding a way to measure what balance your audience wants would be good. Any ideas?
    * Loved hearing "the peoples view" video section. Might be an idea for windowsbuild too.
    * Charles, good to see the c++ renaissance momentum continuing. What really did trigger this change at MS? Can you share?
    * The constructor/destructor video thing is so childish! love it!! lol
    * @androidi, i've often wanted a quick "just my code" / "step, avoiding code that is not in my project" command.
    * @charles can you email anyone to ask how hard that might be to do. @anyone, maybe an ide macro could do it?
    * Nice to see clang mentioned and surprised, as it sounds like a competitor for ms? For Windows programming it appears to be a year or so off from being production ready at least link/runtime wise,
    at least from my brief experimentation with it (someone can correct me here).
    Good stuff.

  • Peter JonasPeter Jonas

    Amazing info, thank you so much. You guys are cool and I love listening to you. Please keep up the good work.

  • I can't shake off the feeling that in terms of core language features of C++0x, vNext is going to be a bit of a letdown. We've had more confirmations of stuff not going to be available than stuff that's actually going to be implemented, like explicitly defaulted and deleted special member functions and non-POD initializer lists. I just hope that additions like scoped enums (a basic feature of Java/C#) will make it. It's especially painful because GCC already does all of this.

  • To anyone who's interested to have the coloring now. There's an add-in called Highliterr that does the coloring for C++ on VS2010.

  • hmmhmm

    Great video.

    When can we expect vNext to be released? This year, next year?

  • felix9felix9 the cat that walked by itself

    Mmm... what we really need is a lecture about COM, especially the next version Smiley

  • ,felix9 wrote

    Mmm... what we really need is a lecture about COM, especially the next versionSmiley

    +1 for that.  Who is the COM.next equivalent of Don Box?

    I am definitely concerned about this COM.next business.  Returning to all of COM's warts -- DLL hell, bloated registry, programming ugliness -- would be a massive step in the wrong direction.  That's one thing I expect to see in the post-BUILD info dump is what exactly this COM next is and how it is not going to repeat all of the mistakes of the past.

  • @Charleshttp://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html#rev130953

    As of revision 130953 committed on May 5, 2011, clang definitely claims to.  I haven't tried writing code against it though.

  • @Charles: Oh, and you are correct, clang is definitely behind gcc in terms of C++11 implementation.  However, the rate of adoption in clang has been much faster over the past 3-4 months than it ever was for gcc (of course gcc has most of it implemented now, so it has naturally slowed down.  gcc had the benefit of a few extra years of development before clang really got C++03 fully implemented.

    If you cannot tell, I'm a fan of clang (although I primarily work in VC++).

  • BenjaminBenjamin

    You have an error in your timeline. Your destructor will get called twice. You should never call it directly, just close the show, and it will get called automatically.

  • JohnJohn

    We need more improvements on the C++ complier. Now I am using LVVM because it produces better executeables.

  • CharlesCharles Welcome Change

    @Benjamin: Smiley Trying to be too cute, we are. You're right, of course.Think of the links as a way to navigate through the show and in the case of the destructor link, to shut it down (yes, you don't call destructors explicitly - which is one the cool things about them). We'll dial back the cuteness to preserve accuracy.

    C

  • CharlesCharles Welcome Change

    @John: What improvements do you want to see? Please be specific! We will have the compiler people (front and back) on GN in the future. Also the linker people.

    Please tell us what's not working effectively or there's no way for Diego to convince his team to address the issues...

    C

  • @Charles: Well technically (with the appropriate cajoling), you can call a destructor manually.  It's just typically a really bad idea.

    I've had to do it before in the case where we didn't want to link the to the CRT.  Unfortunately, the CRT handles calling constructors and destructors of global statics.  So, we had to hand-roll the code to call those guys ourselves.

  • CharlesCharles Welcome Change

    @MichaelPrice: True. My use of "don't" is inline with your notion of it being a really bad idea, generally Smiley

    C

  • freeflyfreefly

    @felix9 : I would love to see the COM vNext too :)
    @ryanb : The time when COM introduced was totally different, and it made sense to that way... IT industry was not so matured back then... so I am looking forward to the new COM ( if there is something like that ). COM is still serving well and there are people still doing COM development. Any of the problems you mentioned ever stopped anyone to go that way, but they yelled about it...all along that way :). C++ and library support has changed upside down since the introduction of COM. We all learned many lesson, sure microsoft must have learned more.
    I hope to see Don Box doing a COM vNext in "Build 8". He himself, once laughed at the C++ Devs in one of his past talk. If there is COM vNext, I am sure all the past fan base of COM and the companies that have huge code native/COM investments will jumb over it. It is one of the largely accepted programming model.

    Personally I am not very hopeful about what coming next !!! provided the fact that, last time, they said "10 is the new 6". They were right in the sense that features were taken back and we are put back to the past...for example, they took away the C++/CLI intellisense, IDE typing/intellisense response way slower than VS2008. I know there has been videos and apologies about C++/CLI saying we dont have resources. I still can't digest it. There is a new version of Visual studio light switch ( Not sure what they are trying to solve, a stand alone, from the scratch VC++ IDE would have sold more than this product ), a zillion redundant API stack for .Net data access( e.g. ADO.Net, Linq to SQL, Entity FrameWork, M... ). You guys have resources for all this crap, but not for restructure the intellisense feature!!!
    I just dont want to continue writing my frustrations...
    expecting to see some good things in Build 8!!!

  • felix9felix9 the cat that walked by itself

    Don Box might be busy with other stuff, but we'll also need Jeffrey Richter with the new edition of 'Windows via C/C++'.

  • CharlesCharles Welcome Change

    Thanks for the feedback and suggestions! Keep it coming (we're listening, of course). In terms of specific VC++ requests, you should consider adding them the UserVoice site: http://visualstudio.uservoice.com/forums/121579-visual-studio/category/30937-c- or the Visual Studio team's Connect site: http://connect.microsoft.com/VisualStudio or the VC++ team blog: http://blogs.msdn.com/b/vcblog/ and right here on C9, too, of course.

    Diego will pass info along since he's the man in the middle, your proxy to the C++ engineering team. Smiley

    Keep on posting,

    C

  • freeflyfreefly

    @felix : Don Box has been working on the M and Oslo stuff for a couple of year now .. I guess. May be charles can go and find out what he is upto... :)

    Jeffrey's books are always outstanding...

  • CharlesCharles Welcome Change

    @freefly: I'll send Don a note.

    C

  • Allan LindqvistaL_ Kinect ftw

    IDE updates look very nice Smiley

    also interesting to see the other non VC specific (i hope) ide improvements, its been WAY to little info about VS.vNext imo.. <rant>did microsoft just forget about its talk about openness?</rant>

    ofcourse, thats another show Smiley but its a show that should be made. [lemme guess, more info @ build? Wink]

  • freeflyfreefly

    @Charles : Thanks

  • new2STLnew2STL xkcd.com

    Lets see about the COM.vNext, I think the basics of COM are really good and play nice in Direct2D and WIC ... talking on it, One stuff I want some love is about Media Foundation, lots of sources on web still high tied to DirectShow. MF can be a nice theme for a talk about new COM and Native development (plus help better expose it to others developers)

  • Paul ToppingPaul Topping

    I second the desire for refactoring support. Just being able to change the name of an identifier semantically, rather than Replace In Files, would be fantastic.

  • BrianBrian

    @00:29, when you said "incredible amounts of feedback," did any of that include disdain about baring your arms? From t-shirts to fleeces is a massive shift. If it's due to the room being cold or something, ignore this, but no one should have a say in what you wear.

    Mahmoud Saleh's lecture on the CRT was awesome. As a hobbyist I learned so much from his section. Thanks and keep up the good work.

  • CharlesCharles Welcome Change

    @Brian: Actually, we re-shot the green-screen parts after the fact for a number of tiresome reasons. We decided to leave our jackets on for the second take for some reason. Mostly because we're cool, man. We're cool. Smiley
    C

  • STLSTL

    [MichaelPrice]
    > What is up with that range-for snippet?  The snippet should read:
    > for (object var : collection_to_loop) { }
    > instead of
    > for each (object var in collection_to_loop) { }

    "for each" is an old non-Standard extension. I recommend against using it (as it's generating weird code that can't be used to mutate elements in place). Either "for (auto i = v.begin(); i != v.end(); ++i)" or "std::for_each(v.begin(), v.end(), lambda)" are superior.

    Note that the C++11 range-based for-loop (which is not implemented in VC10; when it is implemented, it will not be vulnerable to the non-Standard "for each" extension's problems, because C++11 has carefully specified it) is best used as either "for (auto& e : v)" or "for (const auto& e : v)" which loops over elements in-place (and permits modification if you wish). "for (auto e : v)" will copy elements, and cannot modify elements in-place.

    hmm> When can we expect vNext to be released? This year, next year?

    We can't ever talk about (or even hint at) release dates before they're publicly announced.

    Charles> yes, you don't call destructors explicitly - which is one the cool things about them

    This is generally true, but objects constructed via placement new must be explicitly destroyed. For example, the STL does this in std::vector. It's very advanced usage, though - many programmers can go through their whole careers without ever learning about this.

  • CharlesCharles Welcome Change

    @STL: Thanks for the clarification, STL. Always great to have your wisdom shared here! I hope we can get you into the studio soon, man. Smiley

    c.C::~C();

  • C++ PPL and AMP are steps in the right direction.

    I have noticed that Microsoft does not use the STL for the existing C++ GUI APIs such as the Windows API and MFC.   I hoping that will change in the future.  If any current plan omits STL mechanisms for collections of data, I hope they rethink and consult with the person STL to integrate effectively.

  • Doug CarterDoug Carter

    Please, please, please tell me that the toolbar quick search feature also works in the Project property pages. Digging through those to find the one switch I need to change is so tedious.

  • DavidDavid

    Good show, thanks for doing it.

    If you are taking feedback, I'd argue for content that is more technically advanced. For example, with respect to CRT, I would spend much less time on trivial things like "the CRT contains functions your application can call, and these functions in turn call Win32" (one minute of quick recap is all you need, we aren't exactly new to this C++ thing), and much more time on non-trivial things like:

    * the CRT features that the compiler uses,
    * what happens when two versions of the CRT (say, dynamic and static) load into the same process (why this is bad and how to tell that this happened),
    * how the patching is or should be done (version numbers, side-by-side execution, policies looking forward, etc),
    * what tests do the CRT devs use (actual examples),
    * was the addition of _s functions a good or bad idea in retrospect and how many have adopted these,
    * is there anything we might want to know as regards the interaction between CRT and STL, etc.

    Less fluff, more stuff.

  • CharlesCharles Welcome Change

    @David: Thank you for the feedback! We will try to ensure we have content that is suited for advanced users in addition to less advanced users. It's challenging, but doable (we want to not ship hour long episodes...). BTW, Mahmoud will be doing a C9 Lecture series on CRT, so that's where the advanced CRT material will materialize.

    Cheers,

    C

  • ,STL wrote

    [MichaelPrice]
    > What is up with that range-for snippet?  The snippet should read:
    > for (object var : collection_to_loop) { }
    > instead of
    > for each (object var in collection_to_loop) { }

    "for each" is an old non-Standard extension. I recommend against using it (as it's generating weird code that can't be used to mutate elements in place). Either "for (auto i = v.begin(); i != v.end(); ++i)" or "std::for_each(v.begin(), v.end(), lambda)" are superior.

    Note that the C++11 range-based for-loop (which is not implemented in VC10; when it is implemented, it will not be vulnerable to the non-Standard "for each" extension's problems, because C++11 has carefully specified it) is best used as either "for (auto& e : v)" or "for (const auto& e : v)" which loops over elements in-place (and permits modification if you wish). "for (auto e : v)" will copy elements, and cannot modify elements in-place.

    I wonder if there will be room in the C++ snippets to generate the byref and byconstref patterns.  Picking a "default" pattern could be a very risky move...

    However, if I had to vote for a default, it would be for (const object & var : collection_to_loop) as it is the "safest" pattern.

    Also, I agree about std::for_each... Let the library do the hard thinking (and possibly optimization) for you.

  • petkepetke

    Just gotta say, Charles. Your are a bit of a brute and that is much appreciated. Its exactly what a show like this needs. A guy who shots from the hip, who isn't afraid to ask silly questions, and does not mind to much too about political correctness. I get the feeling that Herb isn't always to keen on some of your vague or open ended questions, but that's the best kind. It makes for the most interesting answers. "The Q and A at "C++ and beyond" for instance was very good like that. When you assked Alexandrescu "Why D?". A more careful or less bold man would have avoided the sensitive topic ... and we would have missed out on such an interesting discussion. Keep up the good work and don't change a thing.

    Cheers

  • CharlesCharles Welcome Change

    @petke: Thanks Smiley It's just the way I play this game: what comes to mind comes out of my mouth (and sometimes to the chagrin of viewers, but mostly to the benefit of the conversation). Appreciate the kind words.

    C

  • AdrianAdrian

    I appreciate the types of features you're adding to the IDE, but please, please, please focus on performance first. VS 2010 is a huge step backwards in performance for basic editing. These must be fixed before you start putting more stress on the editor and IntelliSense.

  • Marat AbrarovMarat Abrarov

    Qt Creator?
    I really like use MSVS 2010 (actually VC++ compiler 10) and happy to see MS didn't forget C++. Here's a question for Steve Balmer: why MS still didn't buy JetBrains - after IntelliJ IDEA MSVS (even C# environment) seems like WordPad.

  • rigrig

    I would also love to see more on the CRT. Angel But one question I would like to see answered, is why do I need to 'care' about it? Are there certain scenarios where understanding what it does matters?  Thanks!!!

  • rigrig

    ,Charles wrote

    @David: Thank you for the feedback! We will try to ensure we have content that is suited for advanced users in addition to less advanced users. It's challenging, but doable (we want to not ship hour long episodes...). BTW, Mahmoud will be doing a C9 Lecture series on CRT, so that's where the advanced CRT material will materialize.

    Cheers,

    C

     

    I am sooooo happy about the CRT series!!!!!! 

  • The player is not able to stream the video, neither in "auto" nor in "smooth streaming" fornat. My system is Win7SP1pt-BR+IE9 with dial-up connection. Any setting I should try?

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.