Did you know that approximately 41% — or around four of 10 — of the 50 million or so rental housing units in the U.S. are owned by individual investor landlords? Owning real estate can be a great investment. You’ll benefit as the property appreciates in value over time, and you can also enjoy […]
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 […]
Update: This post is old but still accurate as far as comparing JSON with property lists, with examples for Objective-C code. If you’re using Swift, see my newer post that updates this one for Codable and Swift examples. Mac OS X and iOS include support for JSON and property lists, two generic structured data formats, […]