<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=""><div class=""><div class="">-1&nbsp;</div><div class=""><br class=""></div><div class="">An alternative would be to:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>1)&nbsp;State clearly in all relevant documentation that ‘where’ filters and &nbsp;‘while’ terminates.</div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>2) Eliminate the use of ‘where’ within ‘while’ clauses.</div><div class=""><br class=""></div><div class="">This seems pretty straightforward to me. The principle in&nbsp;&nbsp;#1&nbsp;should be easy for even beginners to grasp.</div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><br class=""></blockquote><div class="">Using ‘guard’ statements instead of ‘where’ clauses adds a lot of visual noise for me.&nbsp;</div></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 10, 2016, at 1:08 PM, Erica Sadun via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">On Jun 10, 2016, at 1:06 PM, Rob Norback via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">Following Brent's logic that the for-in where should mimic the switch statement functionality, then this example:<br class=""><br class="">for (eachKey, eachValue) <br class="">where eachValue &gt; 5 <br class="">in theKeyValuePairs {... }<br class=""><br class=""></blockquote><br class="">&lt;squish&gt;<br class=""><br class="">I finally convinced myself of which direction I wanted to go: <a href="https://github.com/apple/swift-evolution/pull/362/files" class="">https://github.com/apple/swift-evolution/pull/362/files</a><br class=""><br class="">Related blog post here: <a href="http://ericasadun.com/2016/06/10/swift-where-oh-where-can-my-where-clause-be/" class="">http://ericasadun.com/2016/06/10/swift-where-oh-where-can-my-where-clause-be/</a><br class=""><br class="">Big thanks to Brent and Wux.<br class=""><br class="">-- E<br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></body></html>