3 ms·
It tells the tragic story of a language designer fighting to avoid null while building on/interfacing with an existing platform that has null.
by throwaway4good 5y ago
It tells the tragic story of a language designer fighting to avoid null while building on/interfacing with an existing platform that has null.
- zaphirplane 5y agoKotlin kind of got away with it, in the sense that I (massive statically) don’t hear people complain about null on the Java interoperability calls
- throwaway4good 5y agoI think Kotlin took a more pragmatic approach - basically introducing ? and ! to signify that something could be null or something isn't null even though the compiler cannot see it.
- DonHopkins 5y ago"My favorite is always the billion dollar mistake of having null in the language. And since JavaScript has both null and undefined, it's the two billion dollar mistake." -Anders Hejlsberg "It is by far the most problematic part of language design. And it's a single value that -- ha ha ha ha -- that if only that wasn't there, imagine all the problems we wouldn't have, right? If type systems were designed that way. And some type systems are, and some type systems are getting there, but boy, trying to retrofit that on top of a type system that has null in the first place is quite an undertaking." -Anders Hejlsberg
- cxr 5y agoJS has null, the notion of a reference/binding being undefined, and the notion of a reference/binding being defined but assigned the value undefined.