Hacker Newsnew | comments | show | ask | jobs | submitlogin

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.




Applications are open for YC Summer 2015

Guidelines | FAQ | Support | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: