Null Object Pattern in Swift
When something returns nil, it spreads like a disease. Checks for nil and optional unwrapping pollute all the functions around. The whole object-oriented approach suffers. Instead of creating objects and telling them to do work, we write procedural code “if this is not nil, do…