Herb Sutter: C++ Questions and Answers
- Posted: Jun 07, 2011 at 6:45 AM
- 65,417 Views
- 19 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Herb's last appearance on C9 was a relatively short chat with me about C++0x. You wanted more questions asked and some of you thought I was just too soft on Herb. Well, Herb decided that the best way to get the questions you want asked is, well, to have you ask them. Most of the highest user-rated questions were asked and Herb answers with his usual precision. So, without further ado, it's C++ question and answer time with the great Herb Sutter, powered by you.
Questions (click the question link for Herb's answer):
ZenJu: What is the strategy to deal with C++ language and standard library design flaws in the long run? Are you afraid "bad design decisions" may accumulate over time, thereby making it more and more harder for newbies to learn the language? Herb also briefly discusses noexcept... (two for one!)
Cory: Concepts — why did they fail and what work is being done to bring something like them back?
Anteru: Modules - Are they really coming, and if so, when do you expect the first implementation?
David: why the long time in C++ standardization work? Will the next standard take as long?
Cory: Filesystem — something like boost::filesystem is desperately needed.
Cory: Threading — thread pools, fine-grained task model, thead-safe containers.
Charles: Why not add an async/await language-level pattern to C++ just like in C# vNext?
petke: What is on the top of your post C++0x wishlist?
Thanks for all your great questions and thanks to Herb for taking time out of his insanely busy schedule to sit down and answer as many of the highly user-rated questions as possible. Great stuff! We should do this again. For all the folks who asked about specific VC vNext implementations, please try to make it to BUILD as there will be a significant C++ presence at the developer affair in Anaheim (Sept 13-16, 2011). If you can't attend the event in person, then you will be able to watch all of the session online, as usual, after the event right here on Channel 9.
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.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Regarding cpp prine. Why dont you make compiler compile depending on the file extansion... just please dont make it cppp :D
So for .cpp compiler does this, for .cppprime compiler does that. Ofc just having a new language would be simpler, but breaking the compatibility would be baaad.
Thanks, for that Herb and Charles.
Remaining questions:
Herb, what do you actually do at Microsoft? Do you work with the compiler team? C++ usage across the organization? With the parallel processing team? All of the above?
What sort of work/studying have you done in the past that prepared you for your job now?
I'm Cory. Thanks for answering most of my questions, Herb. I asked all of them in the reference of C++ standardization, not in terms of Microsoft's tools, so I'm glad you picked up on that. Sorry if there was any confusion with my short statement-questions
Happy to hear that concepts and polymorphic functions are still on the plate. Thanks for all your hard work -- looking forward to playing with it when compilers catch up.
@PhrostByte: Herb answered all of your questions that were highly rated. Good job, Cory!
C
Thank you for a great talk! I am glad my modules/templates question made it in :)
So, the proposed module would allow people to expose basically "C with classes" code, which is far from what can be done in complete modern C++. You briefly mentioned template instantiation - is there something I can read about that idea? I am just trying to understand - how could you ever expose something like standard containers from a module (or instantiate it beforehand)? That code is parameterized to the the concrete type and then machine code (or some intermediate representation) is emitted. In either case, I think the compiler will need source code, or you else you are talking about some kind of separately and completely compiled "generic" that lives in a lib and gets dynamically linked (ie not part of this compilation).
Does this make sense or am off?
Thanks!
Now I found http://herbsutter.com/ and http://www.gotw.ca/
Thanks Herb!
There is at least a candidate for a portable systems language that is type and memory safe and comes quite close to C/C++ performance
ATS http://www.ats-lang.org/
http://academic.research.microsoft.com/Paper/6926597
Maybe an Expert to Expert episode with Erik and Herb?
Always love hearing Herb's (and STL's) insights into the standardisation process and the design planning behind C++.
I'll also add a vote for an Erik/Herb E2E, even though I can probably guess the plot (Erik says C++ is trying to be more like Haskell, Herb agrees but is defensive about the implied charge of plagiarism, Erik gives contrived examples, Herb gives other examples, Erik backs down and they all lived happily ever after. Better than Hollywood!)
I am facing a big problem downloading the video. The download starts up fine, but then slowly the speed goes to zero. I have to stop and resume the download to get it to start again :(.
@zooba: You do realize that this has already happened, right? Not sure we need to put them together again unless the conversation is different from the magic that already happened...
http://channel9.msdn.com/Shows/Going+Deep/E2E-Herb-Sutter-and-Erik-Meijer-Perspectives-on-C
C
@Charles: Hah, you're right. How could I forget that. *goes to see whether my prediction was a suppressed memory*
Could we please have transcripts for these discussions? 600MB for each is a bit too much.
I was looking forward to reading Herb's answers to the questions on this page. The instruction to do so says "click the question link for Herb's answer". However, clicking any of the questions simply navigates to the top of the page and no answer is revealed.
I'm using Firefox 5.0, one of the most popular (and standard-adherent) browsers around.
I know Microsoft have a history of ignoring web standards but, for heaven's sake, this is one of the simplest tasks to code on a web page. Please fix it so that I may read Herb's responses.
@Disgusted of Tunbridge Wells: This isn't actually as simple as you may be thinking. Those links are designed to make the video player jump forward to a specific point in time, they have nothing to do with any known web standard. So... if you can play the video on the page, then the links should work. We do test in FireFox 5.0 and I've seen no issues. We also support HTML 5, but since FireFox doesn't support h264 video (which is what we have already encoded and available) that isn't an option for you.
Your precious FX5 does not adhere to the H.264 standard.
@OS guest:Code and data (like std::cout) in libraries are fully instantiated.
I have to take exception to the explanation of why we don't have polymorphic lambdas. It wasn't a consistency problem or because the committee was too scared of implicit templates. It was because nobody knew how to get them to work inside concepts-constrained templates (because the lambdas would be unconstrained). At the time, concepts were an approved part of the standard. Once concepts were taken out, it was too late to reintroduce polymorphic lambdas, but even if it weren't, I doubt anyone who hopes for a future standard with concepts would have pushed to reintroduce them.
[I think I have a solution for the problem of interoperating between constrained and unconstrained templates now, but at the time it was an unsolved problem.]
Modules and shared libraries are not really related as far as I can tell. Pete Becker was working on shared libraries, but that's a separate issue from modules. The point of (Daveed's) modules design is obsoleting the #include model, which makes it so difficult for us to do so many things well in c++.
Also, I'm confident that making modules work with templates can be far easier than implementing export, which was "designed" in a hurry with no implementation experience and don't have the same information-hiding capability.
Remove this comment
Remove this thread
close