HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Going Native 2012 Keynote Stroustrup

savage3092 HN recommenders · recommended in 2 months, 2012-2025
YouTube
33K views · 14 years ago · talk · dated

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.

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.

C, C++, Rust, Go & systems languagesProgramming language design#c++#bjarnestroustrup#c++11#stl#typesafety

5 comments from Hacker News

@quuxplusone2025 · in “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" 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

CitesView on HN
@harry82019 · in “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 arguments presented when you bring un-braced blocks up. They're insanely ridiculous. (vertical space, need static analysis, etc.) If you were betting your retirement savings on no bug in the line of code now or in the future, you'd be very nervous about it sure. And then you would brace it. Unbraced blocks are a minor thing that mostly don't matter. I wouldn't fight too hard over it. It's just that it's so very, very clear that one way is bugs for zero benefit while the other isn't. Meh. So here's Bjarne being "Uber-Macho" to the delight of the conference crowd. Note the quote: "I think I understand what you're saying and I think you happen to be wrong." (crowd whoops in glee). ▶ this video This is a pretty ugly way of saying "I disagree and this is why..." But the crowd loves it. That attitude ge

CriticalView on HN
@harry82017 · in “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 work because the language changed. It was very unstable for a very long period of time. At some point, I said, no, no more. In an interview I said exactly that, that I didn't use it because it wouldn't stay still for two days in a row. When Stroustrup read the interview he came screaming into my room about how I was undermining him and what I said mattered and I said it was a bad language." Ken Thompson; cited in Seibel, Peter (2009). Coders At Work. p. 475. Alexandrescou openly criticises Alasdair Meredith at cpp con in a way that isn't really friendly or respectful. He also finishes all his talks with "Destroy!" as an open acknowledgement of the defensiveness he feels about the naked hostility that exists in the C++ world. I like his stuff and the bulk of his attitude, I hate the context

CriticalView on HN
@munk8012013 · in “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

RecommendsView on HN
@agentultra2012 · in “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.

RecommendsView on HN
Rust: A Language for the Next 40 Years - Carol Nichols55:08

Rust: A Language for the Next 40 Years - Carol Nichols

ChariotSolutions
367K views • 7 years ago
CppCon 2015: Bjarne Stroustrup “Writing Good C++14”1:40:46

CppCon 2015: Bjarne Stroustrup “Writing Good C++14”

CppCon
351K views • 11 years ago
GopherCon 2014 Opening Keynote by Rob Pike56:36

GopherCon 2014 Opening Keynote by Rob Pike

Confreaks
38K views • 12 years ago
Google I/O 2012 - Meet the Go Team1:00:29

Google I/O 2012 - Meet the Go Team

Google for Developers
108K views • 14 years ago
Lang NEXT 2014 Panel  Systems Programming in 2014 and Beyond1:05:56

Lang NEXT 2014 Panel Systems Programming in 2014 and Beyond

25msr
3K views • 8 years ago
Can C++ be 10x Simpler & Safer?  - Herb Sutter - CppCon 20221:54:00

Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022

CppCon
277K views • 3 years ago
OSCON 2010:  Rob Pike, "Public Static Void"12:31

OSCON 2010: Rob Pike, "Public Static Void"

O'Reilly
119K views • 16 years ago
GopherCon 2014 Inside the Gophers Studio with Blake Mizerany48:19

GopherCon 2014 Inside the Gophers Studio with Blake Mizerany

Confreaks
8K views • 12 years ago
C++ Seasoning1:17:12

C++ Seasoning

aghuttun
58K views • 13 years ago
Dconf 2014 Day 2 Keynote: The Last Thing D Needs -- Scott Meyers54:55

Dconf 2014 Day 2 Keynote: The Last Thing D Needs -- Scott Meyers

The D Language Foundation
19K views • 8 years ago
Hacking with Andrew and Brad: tip.golang.org1:02:49

Hacking with Andrew and Brad: tip.golang.org

The Go Programming Language
99K views • 11 years ago
Introducing a Memory-Safe Successor Language in Large C++ Code Bases - John McCall - CppNow 20231:22:21

Introducing a Memory-Safe Successor Language in Large C++ Code Bases - John McCall - CppNow 2023

CppNow
18K views • 3 years ago
The Go Programming Language59:26

The Go Programming Language

Google TechTalks
406K views • 17 years ago
Carbon Language Successor Strategy: From C++ Interop to Memory Safety - Chandler Carruth - CppNow 231:38:57

Carbon Language Successor Strategy: From C++ Interop to Memory Safety - Chandler Carruth - CppNow 23

CppNow
24K views • 3 years ago
GoingNative 2012 - Day 2 - Clang1:00:54

GoingNative 2012 - Day 2 - Clang

aghuttun
13K views • 13 years ago
Rob Pike about the target group of the Go programming language (golang)0:27

Rob Pike about the target group of the Go programming language (golang)

f8C4G86p KbqEFe47
7K views • 6 years ago
Ideas about a new programming language for games.1:55:24

Ideas about a new programming language for games.

Jonathan Blow
530K views • 12 years ago
dotGo 2015 - Rob Pike - Simplicity is Complicated23:12

dotGo 2015 - Rob Pike - Simplicity is Complicated

dotconferences
172K views • 10 years ago
Oral History of Bjarne Stroustrup2:00:10

Oral History of Bjarne Stroustrup

Computer History Museum
75K views • 11 years ago
CppCon 2015: Sean Parent "Better Code: Data Structures"1:04:00

CppCon 2015: Sean Parent "Better Code: Data Structures"

CppCon
106K views • 11 years ago