[swift-evolution] [swift-evolution-announce] [Review] SE-0099: Restructuring Condition Clauses

Thorsten Seitz tseitz42 at icloud.com
Sun May 29 10:11:38 CDT 2016


> Am 28.05.2016 um 22:35 schrieb Chris Lattner <clattner at apple.com>:
> 
> 
>> On May 28, 2016, at 12:07 PM, Thorsten Seitz <tseitz42 at icloud.com> wrote:
>> 
>> What about requiring `let` before each binding and `case` before each pattern?
>> 
>> guard case let x = a, case let y = b, let z = c, x == y else { … }
>> 
>> Now `let z = c` can only be a let-binding and not a pattern matching clause.
> 
> Yes, that would be enough to solve the ambiguity.  The problem with that is that it eliminates a commonality with var/let declarations, which can declare multiple variables.

var/let declarations are sufficiently different from let-bindings IMO that this commonality could be dropped.

-Thorsten



More information about the swift-evolution mailing list