var x : Bool? x = false if x {} // true if x! {} // false if x? {} // ???true we expected "x?" to be "x && x!" it seems to be just "x"?
-
-
@gregtitus Not that this isn’t an interesting question, but is there a practical use for a Bool? variable/argument that isn’t obvious?0 replies 0 retweets 0 likes -
@jimcorreia Well, if you have a method that returns Bool… var data : NSData? let result = data?.writeToFile(path) result is Bool?0 replies 0 retweets 0 likes -
@gregtitus@jimcorreia preferred idiom is probably: if let result = data?.writeToFile(path) { … }0 replies 0 retweets 0 likes -
@curtclifton@gregtitus I've come up with a possibly legit use of a Bool? argument, but I'm still not sold for return values.0 replies 0 retweets 0 likes
@jimcorreia For yes/no/error or yes/no/not-computed-yet.
9:00 PM - 3 Jun 2014
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Greg Titus
Jim Correia
Curt Clifton
Michael Tsai