Re:Null Object Pattern in Swift
by mwsherman on Wednesday November 11, 2015 @08:37PM
(#10550741)
Exploiting the type system to handle nulls is attractive (when that sort of thing is not “native” to the type system) but boy that’s verbose.
[ Parent
| on HN ]
Re:Null Object Pattern in Swift
by danappelxx on Wednesday November 11, 2015 @08:59PM
(#10550824)
I agree. Perhaps it makes the code look cleaner on the outside, but ultimately it makes it harder to maintain. Also, optionals have loads of features (ex: chaining) to make your code much cleaner, though the author doesn't go into that.
It's a neat idea but I don't think it's as good as optionals.