Understand ARC

One of those difficult things for even experienced developers to understand is Automatic Reference Counting, or ARC. It is how Swift manages and conserves memory automatically.  Take a look at the Exercise file. I have a playground in this project with two classes. One is a pizza topping. One is a Pizza. Look at the …

Thrown Errors

There's many ways to handle errors in Swift. For some errors, using throws is a great way to handle errors without crashing the system. Download the exercise file. You'll find a project with an embedded playground.  While there's a lot better ways to do this, I'll use an example of a function coffee(name:) that finds …

The Joys of Beta Swift: More with Optionals and the “does not have a member named” error

We've had another change to the Swift compiler that was brought to my attention by an astute reader. I was aware of it, and you'll notice I even used it in the last few posts, but I really should have warned people about it, and got it fixed. Back in my post on Adding an …