Something important to deal with in any programming language is representing the absence of a value. For a long time, most mainstream programming languages, such as C/C++, Java, C#, Python, and Ruby, had a value called null or nil, which is what a variable would contain if it did not have any value. More accurately phrased: null or nil indicates that a variable is not bound to a concrete object.
When would this be useful? Let’s use Julia’s findfirst function as an example. It locates the first occurrence of a substring:
julia> findfirst("hello", "hello world") #1 1:5 julia> findfirst("foo", "hello world") #2
But how do you indicate that a substring cannot be found? Languages such as Java, C#, and Python would use the null or nil keywords to indicate this. However, it is not without reason its inventor, British computer scientist Tony Hoare, called the null pointer his billion-dollar mistake.