+1, but
> Expand the scope of “if” and “while” statements
+2 for this. At least a dozen times I've been beaten by changing
let foo = bar.map { ...}
into
if let foo = bar.map { ...} {
...
}
only to find myself with a compiler error (because my brain just doesn't
register this transformation as invalid).
I would be fine with limiting such a call to a single line, because a multiline
scenario looks crazy anyway. I would also be fine with disallowing single-line
IFs in this case, because, again, they look crazy. Those two limitations would
allow unambiguous parsing in all cases.
And yay for unbounded lookahead and heroics. We should use all that RAM and
CPUs for something, after all.
A.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution