Created
August 5, 2014 05:26
-
-
Save dmauro/c9b17e95103b35e26b3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Swift in beta 4 | |
if (optional?.methodReturningBool()) { | |
println("awesome") | |
} | |
// Swift in beta 5 | |
if (optional != nil && optional!.methodReturningBool()) { | |
println("damnit...") | |
} | |
// Why not have our cake and eat it too? | |
// This would be great: | |
var optional: Bool = nil | |
println(optional?) // false | |
optional = false | |
println(optional?) // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment