|
|
|
|
|
by stormbrew
3804 days ago
|
|
No, you use checked instead of blah. If blah is type 'Blah?', Checked is type 'Blah'. Edit to add: And unless something has changed since I last tried it, you can also just shadow blah so that inside that scope you're referring to the unwrapped one: if let blah = blah { /* use blah here, it's unwrapped */ }
It looks kind of silly, but I have used it where there was no better name for the unwrapped value. |
|
I still don't understand the point of ! and ?
less is more, swift ought to know.