12 ms·
Null is a billion dollar mistake. Scala, Java, and Javascript all have a difference between undefined and null. The author doesn't go into this detail. He also
by jganetsk 17y ago
Null is a billion dollar mistake.
Scala, Java, and Javascript all have a difference between undefined and null. The author doesn't go into this detail. He also doesn't differentiate between a runtime error and a compile-time error.
If you do the same test with Haskell's undefined, then all the expressions throw a runtime exception.
Haskell and SML really have the approach that has a strong foundation. The inconsistencies across languages are due to them not sharing the same foundation.