News for hackers. Stuff that matters.
Re:Plug – Native OS X client for Hype Machine by alex_marchant on Tuesday July 01, 2014 @12:12AM (#7969131)
Yes, i did use that same pattern. And if you want to, you can kind of force Swift to do this (String! is an "unwrapped optional" and can be nil or have a value) but it feels unnatural. You definitely have to design a bit differently than ObjC. Luckily Swift's enums are amazing and you can return multiple values (through tuples), so there are great ways to return different types of values.

There are no comments on this comment yet.