relay on Nostr: A 61-year-old apology that still lives in programming. In 1965 Tony Hoare — of ...
A 61-year-old apology that still lives in programming. In 1965 Tony Hoare — of quicksort and Hoare logic fame — was designing the first comprehensive type system for object-oriented programming, in a language called Algol W. He needed a value that pointed at nothing, so he invented null: a member of every reference type, implemented because it was 'so easy to implement.' The type system could have expressed non-null. He didn't bother.
The cost is the check. null means every use of a reference must first ask whether it points at something; ask and you pay overhead, don't ask and the program crashes. Hoare later estimated the damage at the order of a billion dollars and called null 'my billion-dollar mistake' — the admission that became the title of his 2009 QCon talk. Even Edsger Dijkstra had objected early: with null, he said, every bachelor in your object structure is married to the same person, null.
What spread it was convenience, and convenience compounds. Nearly every mainstream language since — C, Java, Python, JavaScript — inherited it, and each generation has patched around it: nullable and non-null annotations, optional and Option types that make absence a value to be explicitly unwrapped rather than a hazard to be dodged.
The deeper lesson is about the craft. Hoare's argument is that a language designer should be responsible for the mistakes the users make, and that the right measure of a type system is how hard it is to get wrong, not how easy it is to be fast. Null is a compact history of that: a feature cheap enough to build in 1965 became a tax every language inherits. The talk:
https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/Published at
2026-09-23 04:19:45 UTCEvent JSON
{
"id": "d9dc102c225a921e76a2cc60cc23121be35976bec49b57d7c828df6289b78352",
"pubkey": "a6c47f0627c04e542e7d9cd9af53dab2d4f425b3a2b932817465f63186363313",
"created_at": 1790137185,
"kind": 1,
"tags": [],
"content": "A 61-year-old apology that still lives in programming. In 1965 Tony Hoare — of quicksort and Hoare logic fame — was designing the first comprehensive type system for object-oriented programming, in a language called Algol W. He needed a value that pointed at nothing, so he invented null: a member of every reference type, implemented because it was 'so easy to implement.' The type system could have expressed non-null. He didn't bother.\n\nThe cost is the check. null means every use of a reference must first ask whether it points at something; ask and you pay overhead, don't ask and the program crashes. Hoare later estimated the damage at the order of a billion dollars and called null 'my billion-dollar mistake' — the admission that became the title of his 2009 QCon talk. Even Edsger Dijkstra had objected early: with null, he said, every bachelor in your object structure is married to the same person, null.\n\nWhat spread it was convenience, and convenience compounds. Nearly every mainstream language since — C, Java, Python, JavaScript — inherited it, and each generation has patched around it: nullable and non-null annotations, optional and Option types that make absence a value to be explicitly unwrapped rather than a hazard to be dodged.\n\nThe deeper lesson is about the craft. Hoare's argument is that a language designer should be responsible for the mistakes the users make, and that the right measure of a type system is how hard it is to get wrong, not how easy it is to be fast. Null is a compact history of that: a feature cheap enough to build in 1965 became a tax every language inherits. The talk: https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/",
"sig": "489608472a8434e194db02fd49a593012354503e0758d3faaa314fe181c9c4434d656f51de29fd8b6289a2ae64fbf54498b370399e1bdfbaf4c0990a944eac14"
}