Swift: UserDefaults protocol
Swift 3 brought a tsunami of changes to the language as well as our codebase, some of you reading this may even still be battling with the migration too. But even with all these changes, we’re still left with some APIs within Foundation that are stringly typed , which is totally fine… Until it’s not. It’s kind of a love/hate relationship in that we love the flexability that strings within APIs afford us, but we hate that we have to use them because of the inherit consequences they bring if we’re not careful, they’re pretty much the programming equivalent of running with scissors. We’re given stringly typed APIs because the Foundation framework engineering gods could not predetermine exactly how we intend to use them. So in all their wisdom, power and knowledge, they decided to use strings in some of the APIs because of the unlimited possibilities it creates for us as developers. It’s either that or some type of dark arcane magic. UserDefaults Our topic for today is going...
Comments
Post a Comment