> On May 20, 2016, at 11:53 AM, Matthew Johnson <[email protected]> wrote:
> I am less certain about allowing simple boolean expressions that are not 
> introduced by the `where` keyword (excepting the first one which is 
> introduced with the `guard` keyword).  I think this is a separate question 
> that should receive independent consideration.  I think a reasonable argument 
> can be made both ways.  

That's kind of the heart of the matter.

There's an assumption that guard statements are:

`guard` (conjoined boolean tests) | (conjoined boolean tests,)? (pattern | 
binding (where boolean)?, )+ else {...}

Right? (Except I couldn't figure out how to grammar out the final comma,) I'm 
suggesting:

`guard` ((boolean | (pattern | binding (where boolean)?)),)+ else {...}

instead. (And ditto about final comma) This promotes boolean statements to the 
same standing, so they're not limited to the start of the guard statement or 
syntactically tied to a pattern/binding where there may be no semantic basis.

-- E







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

Reply via email to