This post updated December 6, 2014 to reflect changes in Xcode 6.2 A few weeks ago I did a little thought experiment on how we might re-implement Swift’s optional type by using the Swift enum. If you haven’t read that yet, you can read it here. In this post, we’re going to push a little…
Tag: optional
Re-implementing Optionals using Swift’s powerful enum type.
This post updated December 6, 2014 to reflect changes in Xcode 6.2 If you’ve been messing with Swift much lately, you may have noticed that enum’s do much more than they did in Objective-C, or in most other languages for that matter. In the WWDC videos discussing Swift, one of the presenters mentions that Optionals…