by chomp · 3y ago · 0 comments
Claiming that a reference cannot be null means that if you later realize it has to be, you’ve got a potentially compat-breaking refactoring to make.
So, nullable-by-default is either a good idea or a bad idea depending on lots of complex reasons.
Unfortunately, there's a lot of cultural momentum in this regard.
That exact syntax (modulo langage divergences) is one of the options for “nullable” in Python: https://docs.python.org/3/library/typing.html#typing.Optiona...