Null references or: How I Learned to Stop Worrying and Love Scala Options

James Yoo
James Yoo
Aug 30, 2019 · 8 min read

“I call it my billion-dollar mistake. It was the invention of the null reference in 1965” — Tony Hoare, 2009

For many software developers, the null reference is something they encounter very early in their careers, and continues to haunt them for the rest of their lives. In simple terms, a null reference is when an object is declared but not assigned a value. A situation like the one below could potentially throw what’s called a NullPointerException