Going Native 2012 Keynote Stroustrup
Why Hacker News recommends it
Cited as a good talk on the thinking behind C++11 and on using the type system to prevent bugs; some other mentions quote it critically.
What it is
Bjarne Stroustrup's keynote at Going Native 2012 covers the ideas behind C++11, including using types to prevent errors and simplifying code with the STL.
Recommended by 2 HN commenters across 2 different months, 2012 to 2025.
What Hacker News said
Recommends agentultra · 2012-05 · on “A Dangerous Obsession with Primitives”
This sounds like the kind of problem that puts really expensive robots into craters. [this video] There's a salient point in that talk where he describes a mission that failed due to a human error. Someone forgot to convert an internal representation of a unit in some algorithm which led to a miscalculation and a loss of some millions of dollars. Apparently the error made it through all of the code reviews and tests that were written. Bjarne then shows some pretty simple code that might have avoided such a disaster by specifying your types up front and letting the compiler do the work of converting them. Seems like a pretty simple concept and I wonder why it's so often missed.
Recommends munk801 · 2013-04 · on “Ask HN: What's the best technical talk you've heard?”
GoingNative 2012 - Bjarne Stroustrup talks about C++ 11. Very good talk about the ideas behind C++ 11 [this video]
Cites quuxplusone · 2025-09 · on “My new Git utility `what-changed-twice` needs a new name”
The talk: [this video] Sadly the 25-line original code isn't presented; the code that is presented is the 5-line replacement using the STL's `find_if` and `rotate`. Bjarne sketches the idea that those five lines can be further condensed into two lines with the non-STL `gather` algorithm: auto dest = std::find_if(v.begin(), v.end(), contains(p)); stdx::gather(v.begin(), dest, v.end(), [](const auto& elt) { return &elt == &*source; }); But this is overkill — replacing an O(distance(source,dest)) non-allocating rotate with an O(v.size()) potentially-allocating stable_partition — and more importantly it re-complicates the code. Now, I think part of his point is that `stable_partition` is "simpler" th
Critical harry8 · 2017-09 · on “Thoughts on generative C++ [video]”
"I understand what you are trying to say and I think that you are wrong." --Bjarne Stroustrup, to a chorus of razzes, jeers and laughter at a question in going native a few years back. [this video] about 1:09:30 But hey don't take my word for it, my reputation is nothing and I'm as anonymous as a wrong number whether I like it that way or not. How about Ken Thompson? His doesn't seem to be similar, if you like an argument from authority - and I think such argument has a place if not used exclusively. "I would try out the [C++] language [at AT&T] as it was being developed and make comments on it. It was part of the work atmosphere there. And you'd write something and then the next day it wouldn't
Critical harry8 · 2019-05 · on “Near-duplicate features of C++ (2017)”
What I mean is anything that is showing off, has a lack of humility and implicitly disparages others in a way that is totally unneeded while producing lower-quality, less-maintainable, less robust code. Being clever for the sake of appearing clever. That kind of thing. if(condition) I_am_tough_so_I_do_not_brace(); The un-braced block is a classic "macho" pose in code. leaving out a '{' and a '}', two characters, has no benefit in any way, shape or form. It is decrying "I will never make a mistake with this loose razor blade if you do maintaining it is because you suck" There is literally no reason to do it ever, under any circumstances. Yet I have, and we do. We can change. Now watch the arg