Tales of a Swift future
It’s been a while I came across a post by Andyy Hope (read the references, please) that had a very interesting take on
UserDefaults on Swift. I was really intriged by the way he used protocols, associtated types and enums to get create a better API for
UserDefaults. Specially because he focused, not solely but mostly, on a use-case and on simplifying application by wrapping the interface on a legible interface.