Scala Design Patterns.
上QQ阅读APP看书,第一时间看更新

The null object design pattern

Null objects represent the absence of a value and they define a neutral behavior. This approach removes the need to check for null references and makes the code much more concise. Scala adds the concept of optional values, which can replace this pattern completely.