[swift-evolution] [Review] SE-0099: Restructuring Condition Clauses
Chris Lattner
clattner at apple.com
Sat May 28 15:37:27 CDT 2016
> On May 28, 2016, at 12:13 AM, Patrick Smith via swift-evolution <swift-evolution at swift.org> wrote:
> A different train of thought: could semicolons allow the closure ambiguity to be resolved that Chris brought up a couple of months ago? e.g.
> I imagine it wouldn’t, as the parser would always catch that first ‘{‘ as an opening brace? Would be nice to solve this if possible too.
No, it doesn’t help. To solve that, we would need to introduce a separator between the condition and the body of the loop (like guard has).
I’m optimistic that, in time, we can just make the parser smart enough to handle the existing syntax for the trailing closure case by using lookahead.
-Chris
More information about the swift-evolution
mailing list