Will Roe's blog

Anaλysis Paraλysis » Archives

The problem with null

In programming languages that have the concept of null, any value in a system can be (for example) a number or null; a string or null; an object or null.

Null (or nil in Ruby, undefined in Javascript, etc.) presents a problem for us when working with untyped sources of data. If we’re not careful null values can spread throughout our software, causing errors in remote code locations that expect non-null values.