Hacker News new | comments | show | ask | jobs | submit login

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.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact