<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 20, 2016, at 1:01 PM, Erica Sadun &lt;<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On May 20, 2016, at 11:53 AM, Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" class="">matthew@anandabits.com</a>&gt; wrote:</div><div class=""><div style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="">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). &nbsp;I think this is a separate question that should receive independent consideration. &nbsp;I think a reasonable argument can be made both ways. &nbsp;</div></div></div></blockquote><br class=""></div><div class="">That's kind of the heart of the matter.</div><div class=""><br class=""></div><div class="">There's an assumption that guard statements are:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">`guard` (conjoined boolean tests) | (conjoined boolean tests,)? (pattern | binding (where boolean)?, )+ else {...}</font></div><div class=""><br class=""></div><div class="">Right? (Except I couldn't figure out how to grammar out the final comma,) I'm suggesting:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">`guard` ((boolean | (pattern | binding (where boolean)?)),)+ else {...}</font></div><div class=""><br class=""></div><div class="">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.</div></div></div></blockquote><div><br class=""></div><div>Yep, I know. &nbsp;I’m agreeing with breaking the syntactic tie to pattern binding, just questioning whether we should drop the need to introduce subsequent ones with `where`. &nbsp;I am on the fence as to which is more readable and interested in hearing discussion about that.</div><div><br class=""></div><div>This is what it would look like if drop the requirement that they be tied to a pattern binding but we require `where` on subsequent boolean expressions (meaning each clause is introduced with a keyword.</div><div><br class=""></div><div>`guard` (boolean,)? (((where boolean) | (pattern | binding (where boolean)?)),)+ else {…}</div><div><br class=""></div><div>We could also do this if we wanted to allow all boolean expressions, even the first, to be introduced with `where` to support consistent formatting of all clauses in a multi-line construct like the ones in your example.</div><div><br class=""></div><div>`guard` (where? boolean,)? (((where boolean) | (pattern | binding (where boolean)?)),)+ else {...}</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""></div></div></blockquote></div><br class=""></body></html>