The existence of a null value isn't a billion dollar mistake. The issue is when static type systems allow null anywhere.
Even some dynamic languages don't have a null value. For example, some lisps only have the empty list, which they use as a null-like value by convention.
Related Posts
I've been using "Expected Int, but got String" for my type error messages, but I've been wondering if I could do better.
"Expected Int here, but this value has type String" or "This expression requires Int, but the value is String".
Do you have a favourite?
I've been experimenting with different pagination UIs.
It's so common to have arrows, but I've realised they're redundant here. When you have the adjacent values as well as the final value, you don't need > and >> arrows too.
Thoughts?
TIL Rust has an ambiguity `if Foo {}` -- is `Foo` a value of type bool, or a struct?
Rust solves this by defining a grammar production 'any expression except struct literals' and using it in this position. https://rust-lang.github.io/rfcs/0092-struct-grammar.html