ABSTRACT

Null pointer references are one of the most common errors in programming, and they result from the opinion that every function call should return a value. An alternate view is that some functions might or might not return a value, hence such functions should return an “optional” value. This has the beneficial effect of turning runtime errors into syntax errors. Python does not support optional values; Java supports them; and Scala requires them.