← Back to context

Comment by django77

2 hours ago

I was thinking about a general experience of working with null/nil. Clojure has nil punning which makes sense in the context of the language (lisp variant) and can be nice to work with.

The null is a high price to pay because eventually someone will make some type assertion somewhere in the TS codebase that will end up biting you. Sure, you can be diligent, but will every contributor during the lifetime of a project be?

Not sure about Scala, but I did see NullPointerException every so often, and what is the practical advice to handle them in Scala? It’s to use Option[T]