Hacker News new | past | comments | ask | show | jobs | submit
RIP.

His presentation on his billion dollar mistake is something I still regularly share as a fervent believer that using null is an anti-pattern in _most_ cases. https://www.infoq.com/presentations/Null-References-The-Bill...

That said, his contributions greatly outweigh this 'mistake'.

You misunderstand the “billion dollar mistake”. The mistake is not the use of nulls per se, the mistake is type-systems which does not make them explicit.
Anti patterns are great, they act as escape hatches or pressure release valves. Every piece of mechanical equipment has some analogue for good reason.

Without things like null pointers, goto, globals, unsafe modes in modern safe(r) languages you can get yourself into a corner by over designing everything, often leading to complex unmaintainable code.

With judicious use of these anti-patterns you get mostly good/clean design with one or two well documented exceptions.

The "goto" in languages like C or C++ is de-fanged and not at all similar to the sequence break jump in "Go To Statement Considered Harmful". That doesn't make it a good idea, but in practice today the only place you'll see the unstructured feature complained of is machine code/ assembly language.

You just don't need it but it isn't there as some sort of "escape hatch" it's more out of stubbornness. Languages which don't have it are fine, arguably easier to understand by embracing structure more. I happen to like Rust's "break 'label value" but there are plenty of ways to solve even the trickier parts of this problem (and of course most languages aren't expression based and wouldn't need a value there).

That relies on a programmer doing the right thing and knowing when to use the escape valve. From the codebases I've seen, I don't trust humans in doing the right thing and being judicious with this. But it's a good point, knowing when to deviate from a pattern is a strong plus.
> I don't trust humans in doing the right thing and being judicious with this.

Language-level safety only protect against trivial mistakes like dereferencing a null-pointer. No language can protect against logical errors. If you have untrusted people comitting unvetted code, you will have much worse problems.

That's why code reviews exist, it's good process to make code reviews mandatory.
loading story #47327268