4 ms·
Null is not a problem with programming languages that correctly support (and enforce) optionals. The problem with null in, say, Java is that any object referenc
by hn_throwaway_99 6y ago
Null is not a problem with programming languages that correctly support (and enforce) optionals. The problem with null in, say, Java is that any object reference can potentially be null, which makes it very difficult to know when and why you should verify that something is non-null.
- blackrock 6y agoThis is the key. Didn’t Go or Rust figure this out correctly?
- hn_throwaway_99 6y agoLots of languages have since figured it out. Kotlin (which runs on the JVM) handles it well, https://kotlinlang.org/docs/reference/null-safety.html https://kotlinlang.org/docs/reference/null-safety.html, as does Swift.