HackerTube.dev

Going Native 2012 Keynote Stroustrup

savage309 · 33.4K views · 2012-02-05 · 1:29:49

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

Overview

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.

On Hacker News

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.

Recommended by 2 HN people across 2 months · HN mentions 2012–2025

Topics

Search by tags

What people said

munk801 · 2013-04 · Recommendation

GoingNative 2012 - Bjarne Stroustrup talks about C++ 11. Very good talk about the ideas behind C++ 11 [VIDEO]

Read the original HN comment ↗
agentultra · 2012-05 · Recommendation

This sounds like the kind of problem that puts really expensive robots into craters. [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.

Read the original HN comment ↗
quuxplusone · 2025-09 · Reference

The talk: [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" than `gather` only because it's in the STL. If we add `gather` to the STL too and everyone learns what it means, then there's no objection to using `gather` for "simplification" like this: it would be a straightforward simplification in almost the same way that `std::equal_range(first, last, x)` is a straightforward simplification of `std::make_pair(std::lower_bound(first, last, x), std::upper_bound(first, last, x))`. The "almost" is that actually there is an algorithmic advantage to `std::equal_range`: when you're looking for the upper bound, you don't have to consider any of the elements to the left of the lower bound you already found. You get a (very slight) performance boost by using the combined `equal_range` algorithm. `gather`, on the other hand, has no such advantage; and (as we've

Read the original HN comment ↗

Sources

Video by savage309, played through YouTube.

Data and selection notes

HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.

HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Topic keywords do not match
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources