How To Build a Finite State Machine (FSM) with Swift

Yes, I admit, I ♥ Swift. Currently, I'm working on a game. For the AI of this game, I decided to use Finite State Machines (FSMs). This »

Swift Closure / Lambda with Substitution Variables

Remember Objective-C, where you can use filteredArrayUsingPredicate on a NSArray in conjunction with a NSPredicate? Then you also remember, that it is possible to use substitution »

Swift 1.2 fails to initialize my class hierarchy (is it a bug?) Update: it is!

Yesterday, I happily upgraded Xcode to the latest beta featuring Swift 1.2 for which I'm full of excitement. Migrating the code of my current project »

Publish-Subscribe in Swift

For one of my current projects, I had to implement an event-based messaging system. The first implementation boiled down to a bunch of NSNotificiation and addObserver. »