The Forgotten Art of Structured Programming - Kevlin Henney [C++ on Sea 2019]
cpponsea2 HN recommenders · recommended in 2 months, 2021-2022
245K views · 7 years ago · talk · evergreen
Kevlin Henney revisits structured programming, from Go To Statement Considered Harmful to block-structured code and object orientation. He argues it still matters for how we write code today.
HN commenters point to it in discussions of goto, early returns and cognitive load when reading code.
1:02:27Procedural Programming: It Never Went Away — Kevlin Henney | Build Stuff
Build Stuff - #1 Software Dev Conf
28K views • 8 years ago
50:23Old Is the New New • Kevlin Henney • GOTO 2018
GOTO Conferences
125K views • 8 years ago
1:04:00CppCon 2015: Sean Parent "Better Code: Data Structures"
CppCon
106K views • 11 years ago
44:35Object-Oriented Programming is Bad
Brian Will
2.6M views • 10 years ago
1:03:31Brian Goetz - Stewardship: the Sobering Parts
ClojureTV
39K views • 11 years ago
1:32:47Data-Oriented Demo: SOA, composition
Jonathan Blow
201K views • 11 years ago
54:55Dconf 2014 Day 2 Keynote: The Last Thing D Needs -- Scott Meyers
The D Language Foundation
19K views • 8 years ago
1:00:29Google I/O 2012 - Meet the Go Team
Google for Developers
108K views • 14 years ago
1:14:52Effective Programs - 10 Years of Clojure - Rich Hickey
ClojureTV
176K views • 9 years ago
1:10:42Elements of Programming Style - Brian Kernighan
Institute for Advanced Study
138K views • 9 years ago
1:29:49Going Native 2012 Keynote Stroustrup
savage309
33K views • 14 years ago
12:31OSCON 2010: Rob Pike, "Public Static Void"
O'Reilly
119K views • 16 years ago
1:00:10Functional architecture - The pits of success - Mark Seemann
NDC Conferences
152K views • 10 years ago
33:52Nordic.js 2014 • Douglas Crockford - The Better Parts
Nordic.js
73K views • 12 years ago
1:54:00Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022
CppCon
277K views • 3 years ago
40:56"Liberating the Smalltalk lurking in C and Unix" by Stephen Kell
Strange Loop Conference
25K views • 12 years ago
1:27:46CppCon 2014: Mike Acton "Data-Oriented Design and C++"
CppCon
862K views • 12 years ago
1:55:24Ideas about a new programming language for games.
Jonathan Blow
530K views • 12 years ago
1:17:12C++ Seasoning
aghuttun
58K views • 13 years ago
1:33:022013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++
CppNow
34K views • 13 years ago
3 comments from Hacker News
For some of these reasons, I prefer to write this: if (condition) { throw } else { <rest of code> } Rather than: if (condition) { throw } <rest of code> The justification, which I found in this presentation ( ▶ this video ) is that if you only looked at the block structures, could you tell that the rest of the code might never run?
I get that, but the comment was specifically about pointers (not gotos or structure), and is interesting in general from a historical perspective. The "goto" keyword is similarly dangerous. I've seen very good arguments for leaving it out, and generally poor arguments for keeping it in a language. "I can use it safely" is not a good argument, because it's just like Jim Jefferies' standup routine linked above: "Why should I have my guns taken away from me?" An example of a good argument for structured programming is the talk "The Forgotten Art of Structured Programming - Kevlin Henney [C++ on Sea 2019]": ▶ this video Similarly, this article makes a very good argument that concurrent or async code is essentially the "goto spaghetti reinvented, but even worse ", and that Structured Concurrency is the solution: link
If you haven't seen it, Kevlin Henney's talk about "The Forgotten Art of Structured Programming"[1] is interesting (if somewhat long in the examples later), and somewhat related. It's not specifically about return early (and a case could be made that it should or should not apply specifically to early return), but it is about if, else, return, and how they affect cognitive load when reading code. 1: ▶ this video