I've responded on reddit but here's my take: He t...
# language-proposals
k
I've responded on reddit but here's my take: He talks about how in "very" staticly typed languages changing one line of code requires you to change a lot of other lines of code. Isn't that a harsh overgeneralization? Sure, if you pass
Foo
through your program and suddenly
null
is a valid value, you need to change many (all) instances of
Foo
to
Foo?
But the same isn't true for closed-by-default classes/members. If I need to override a method that is now closed, I need to change one or two lines (which the IDE can do for me). On the other hand, you could make the same argument against any language with a Java-like type system where instead of a
List
, you need to pass a
Collection
through your program. It requires exactly the same number of modified lines as the
null
example.