Re:Null Object Pattern in Swift
by arcticbull on Wednesday November 11, 2015 @09:23PM
(#10550895)
Agreed completely. The null object with inheritance is particularly difficult to deal with because you're just asking to forget to nerf something dangerous in the superclass leaving you with partially functional objects. Optional<T> is the right way to handle this.
There's some saying about Java "design patterns" that can just be replaced with closures. There should probably be another for for ADTs.