> On May 28, 2016, at 1:10 AM, David Hart via swift-evolution 
> <[email protected]> wrote:
> 
> Yet another alternative: would it be possible to disallow commas as variable 
> declaration separators and use them for condition clause separators again:
> 
> let a = 4, b = 8 // becomes illegal and requires to separate them on two lines
> 
> if a > 4, let c = foo(), let d = bar(), c != d { // now comma is not 
> ambiguous anymore
> }

The ambiguity is between “case” and “let” conditions, specifically because 
“case” takes a pattern, and “let” is a valid pattern:

guard (pattern1) = expr1, let x = expr2 else

can be:

guard (pattern1) = expr1, let (x) = expr2 else

or:

guard (pattern1) = expr1, (let x) = expr2 else

-Chris
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to