Hacker News new | ask | show | jobs
by mcv 2309 days ago
Being able to ban null values is absolutely fantastic. That's definitely a big improvement over Java, and seeing it in Typescript makes me wonder why Java allows it. In fact, seeing Option in Scala made me wonder why anyone ever thought null was a good idea.

Even if it's only a compile time check, and can therefore still be circumvented at runtime, this check for null values has still helped me out a lot. At least within a class it ensures my assumptions are consistent, which is not nothing.