New in Swift 5.5: Property wrappers can now be applied directly to function arguments, just like how they can be used to add additional functionality to a property or local variable. For example, let’s say that an app that we’re working on contains a function that saves a Photo for a given name, and that […]
In a previous post I wrote about How JSON compares to Apple property lists and the obstacles to converting data between them. That was a while ago but the post is still accurate, as far as it goes. But Swift changes the situation in some ways, so an update is in order. Recap: JSON vs. […]
Custom getters and setters for fields in a class is not a new idea. We have been using them since our early days in programming. Kotlin, however, takes that concept to a more elegant level by allowing us to define getters and setters at the declaration site of our properties. The primary advantage of this […]