Modelling state in Swift

Dealing with state is hard, error prone, and unavoidable. In this post, John Sundell looks at some of the commonly used techniques we can apply when dealing with state in Swift. I think the first two points - having a single source of truth, and making states exclusive - are key.