HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Null References: The Billion Dollar Mistake - Tony Hoare

JoseCanCited 4× on HN, 2020-2025
YouTube
66K views · 7 years ago · talk · evergreen

Tony Hoare's InfoQ talk in which he describes introducing null references in ALGOL W in 1965 and calls it his billion-dollar mistake. He discusses language designer responsibility and run-time checks.

The standard citation whenever null safety and language design come up.

Programming language designTech pioneers & interviews#tonyhoare#null#languagedesign#algol#typesafety

4 comments from Hacker News

@lossolo2025 · in “Partially Matching Zig Enums”

> Even without a chance of UB. You're adding an implicit `Type | null` to every piece that uses nullable code without handling the null case. Each time you forget to do it, you cause either an UB or a null pointer error. And the place it manifests is different from where it's generated. > Furthermore, listening to Tony Hoare's talk ( ▶ this video ), he mentions that trying to avoid the null, in the context of a language like Java or C#, that permits them is also causing people to waste time working around them. It's an insignificant amount of time in my experience, which makes this irrelevant in practice. I’ve never had to "work around them", this is either a theoretical argument or just sloppy programming. > Sure, but that's not a $0 mistake. It's {time to fix * hourly rate}. Even if you're doing for OSS, you could have been spending that time doing something else. Oh, come on, you’re smart enough to understand that a few minutes every few months may not be exactly $0, but it’s such an insignificant value that it can be treated as $0. > Sure. But trading "ease of use" for "preventing errors" is not something I want in any language I use. Well, you can choose your trade offs, and you can let others choose theirs. So I guess you use Ada for everything? or maybe you use Coq to prove everything? Of course you don’t, you’re also making trade offs, just different ones. > Null/nil are about as good concepts today as silently skipping errors. You exaggerate again. I do not agree with tha

CitesView on HN
@Ygg22025 · in “Partially Matching Zig Enums”

> Sure. With infinite energy, anything’s possible - we can prevent all bugs. The problem is, we don’t have infinite energy. You don't need infinite energy but it is a significant undertaking. The UB seem to obey a power law in regards to their lifetime i.e. every X years number of UB caused problems halves. > I can only recall one serious concurrency bug I’ve ever had (a data race) which took some debugging time to track down, but it wasn’t in Go. YMMV. That's what is nasty about UB in data races. It's not trivial to find and it's a pain in the neck to reproduce. So even taking you at your word, you not having issues with data races isn't the same as "I wrote code free of data races". > As for the “billion dollar mistake”, I understand the argument in the context of C or C++, but not in the context of Go. Even without a chance of UB. You're adding an implicit `Type | null` to every piece that uses nullable code without handling the null case. Each time you forget to do it, you cause either an UB or a null pointer error. And the place it manifests is different from where it's generated. Furthermore, listening to Tony Hoare's talk ( ▶ this video ), he mentions that trying to avoid the null, in the context of a language like Java or C#, that permits them is also causing people to waste time working around them. > The middle network layer will report the error to the user, I fix it, and move on, a $0 mistake. Sure, but that's not a $0 mistake. It's {time to fix * hourly rate}. Even if

CitesView on HN
@benreesman2022 · in “C++ Concurrency Model on x86 for Dummies (2020)”

There's a constant tension between bit-packing and rich semantics older than me! As you likely know C.A.R. Hoare calls `null` his "billion-dollar mistake": ▶ this video . I linked the Cliff Click talk because it's the best example that I know about of someone using some semi-formal rigor around valid states and the transitions between them in the context of raw atomic operations to get a quite clearly correct result with a legitimate performance imperative: he had a machine with 768 cores, customers who bought that machine to have 768 threads jump on a hash table all at once and wanted ~~700x more throughput having paid for the machine. But even Cliff Click made sure that both his conceptual states and their physical representations were going A -> B -> C w.r.t. a given conceptual "register". I'm not trying to knock the serious concurrency pros who need atomic and/or relaxed operations in some super hot path: there are unambiguous use cases for this stuff. I've legitimately needed these things once or twice myself. Lock-free is a bad default. Even the elite concurrency pros work very hard to get something that's both robust and still a win after the constant factors. I'm saying "proceed with high caution, and on the basis of measurement", not "never ever do this".

CitesView on HN
@unlinked_dll2020 · in “A Reply to “Let’s stop copying C””

I believe that's a reference to Tony Hoare's famous talk about the invention of null references which he calls his billion dollar mistake ▶ this video

CitesView on HN
Ada, Past Present and Future44:59

Ada, Past Present and Future

AdaCore
17K views • 15 years ago
Brian Goetz - Stewardship: the Sobering Parts1:03:31

Brian Goetz - Stewardship: the Sobering Parts

ClojureTV
39K views • 11 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
2017 ACM PPoPP Keynote: It's Time for a New Old Language1:12:12

2017 ACM PPoPP Keynote: It's Time for a New Old Language

Guy Steele
7K views • 9 years ago
Four Languages from Forty Years Ago - Scott Wlaschin1:01:45

Four Languages from Forty Years Ago - Scott Wlaschin

NDC Conferences
33K views • 8 years ago
"The Economics of Programming Languages" by Evan Czaplicki (Strange Loop 2023)43:58

"The Economics of Programming Languages" by Evan Czaplicki (Strange Loop 2023)

Strange Loop Conference
141K views • 3 years ago
"Type-Driven Program Synthesis" by Nadia Polikarpova39:40

"Type-Driven Program Synthesis" by Nadia Polikarpova

Strange Loop Conference
15K views • 8 years ago
Stephen Wolfram's Introduction to the Wolfram Language12:56

Stephen Wolfram's Introduction to the Wolfram Language

Wolfram
924K views • 12 years ago
Computer Science - Brian Kernighan on successful language design1:00:06

Computer Science - Brian Kernighan on successful language design

University of Nottingham
332K views • 10 years ago
01 The History of Standard ML: Ideas, Principles, Culture59:51

01 The History of Standard ML: Ideas, Principles, Culture

ICFP Video
7K views • 11 years ago
OOPSLA Conference: Growing a Language54:12

OOPSLA Conference: Growing a Language

Computer History Museum
24K views • 6 years ago
James Gosling - Simula: a personal journey1:12:13

James Gosling - Simula: a personal journey

UiO Realfagsbiblioteket
5K views • 9 years ago
Breaking Down Programming Paradigms: APL's Surprising Learning Curve // Aaron Hsu // Dyalog '1759:03

Breaking Down Programming Paradigms: APL's Surprising Learning Curve // Aaron Hsu // Dyalog '17

Dyalog User Meetings
7K views • 9 years ago
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
Lecture 1 | Programming Paradigms (Stanford)17:26

Lecture 1 | Programming Paradigms (Stanford)

Stanford
1.2M views • 18 years ago
On the Expressive Power of Programming Languages by Shriram Krishnamurthi [PWLConf 2019]59:04

On the Expressive Power of Programming Languages by Shriram Krishnamurthi [PWLConf 2019]

PapersWeLove
27K views • 7 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
RustConf 2017 - Closing Keynote: Safe Systems Software and the Future of Computing by Joe Duffy42:45

RustConf 2017 - Closing Keynote: Safe Systems Software and the Future of Computing by Joe Duffy

Confreaks
2K views • 9 years ago
Scale By The Bay 2018: Bryan Cantrill, Rust and Other Interesting Things37:07

Scale By The Bay 2018: Bryan Cantrill, Rust and Other Interesting Things

FunctionalTV
45K views • 7 years ago
Alan Kay - Programming and Scaling56:39

Alan Kay - Programming and Scaling

Colin McDonnell
36K views • 11 years ago