3 ms·
I don't see the issue. Armin went completely insane IMHO. This problem is usually solved by expressing the type "Foo or Null" as Foo? in such a gradually typed
by rurban 12y ago
I don't see the issue. Armin went completely insane IMHO.
This problem is usually solved by expressing the type "Foo or Null" as Foo? in such a gradually typed language.
Maybe the critics should lookup the basic type literature first.
Such posts will kill python. And this type of type critic already did kill python for Google. (And kept perl 10 years behind)
- the_af 12y agoIf when the type of a function F is "Foo or Null", you can express it as something like F(...): Foo? and if you're later forced to deal with such a value, Null cannot catch you by surprise, then haven't you just rediscovered Option types? If, on the other hand, "?" is just an operator you use on values that can be null, to guard against an exception, this seems less useful. Are you going to wrap every return value of every function call with it? What happens if you forget? How can you know, at a glance, if a function may return a null value?