2 ms·
Both of those work in Swift too. The ?? operator exists verbatim, and the matching can be done using a switch/case statement. Unfortunately, it is not true tha
by mikeash 12y ago
Both of those work in Swift too. The ?? operator exists verbatim, and the matching can be done using a switch/case statement.
Unfortunately, it is not true that every Swift statement is an expression. The if/let construct is actually a special case. That means that you can't do something like:
if (let x = foo) && (let y = bar) { ...
Which is too bad.