<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">-1 Where provides a nice clarity when distinguishing the clauses from the optional binding</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">







<p><b><font color="#cc0000">___________________________________</font></b></p><p><b>James⎥Head of Trolls</b></p><p><b><font color="#cc0000"><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a>⎥<a href="http://supmenow.com" target="_blank">supmenow.com</a></font></b></p><p><b><font size="2">Sup</font></b></p><p><b><font size="2">Runway East
</font></b></p><p><b><font size="2">10 Finsbury Square</font></b></p><p><b><font size="2">London</font></b></p><p><b><font size="2">
EC2A 1AF </font></b></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 23 June 2016 at 16:59, Shawn Erickson via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="white-space:pre-wrap">I am -0.5 on removing the where clause. I will note that removing it now - given the appearing limited usage - shouldn&#39;t cause a large disruption to most users. It may allow us time to think more about it and things related to it since it can be added back at a later point without breaking swift 3 users.<br><br>I personally was bitten by misusing where with a for-in, I had the mental model that it would abort the loop. To be honest I am not sure why I had that mental model given long history with SQL where clause and using where heavily in switch case statements (e.g. acts as a filter). I think for some uses I had an assumption that the optimizer could prove that the where would in fact always filter past a certain loop point and that may have screwed up my mental model in the general case.<br><br>If you make such a mistake with where you may never know because from a line debugging perspective your loop content never gets executed if the where is violated yet you may still be looping (possibly causing destructive consumption or a performance issue).<br><br>With that said I do find the syntax fairly clean and helpful when using for-in (if not abused by chaining many together). I don&#39;t have a better name for it, if it stays around I think it should stay named where to align with where in other constructs in the language.<br><br>I do think for completeness we should consider adding &#39;until&#39; for abort looping case. We should also consider moving the location of the where (and potential until) on the other side of &#39;in&#39;.<br><br>One negative to this syntax (assuming not abused) is not being able to probe things with a line based debugger. Of course many compact constructs in the language are that way. ...maybe someday lldb and Xcode could allow for statement scoped breakpoints<br><br>-Shawn<br><br></div><span class="im HOEnZb"><div class="gmail_quote"><div dir="ltr">On Wed, Jun 22, 2016 at 9:12 PM Chris Lattner &lt;<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>&gt; wrote:<br></div></div></span><div class="HOEnZb"><div class="h5"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Swift community,<br>
<br>
The review of &quot;SE-0105: Removing Where Clauses from For-In Loops&quot; begins now and runs through June 29. The proposal is available here:<br>
<br>
        <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0105-remove-where-from-forin-loops.md" rel="noreferrer" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0105-remove-where-from-forin-loops.md</a><br>
<br>
Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at<br>
<br>
        <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br>
or, if you would like to keep your feedback private, directly to the review manager.<br>
<br>
What goes into a review?<br>
<br>
The goal of the review process is to improve the proposal under review through constructive criticism and contribute to the direction of Swift. When writing your review, here are some questions you might want to answer in your review:<br>
<br>
        * What is your evaluation of the proposal?<br>
        * Is the problem being addressed significant enough to warrant a change to Swift?<br>
        * Does this proposal fit well with the feel and direction of Swift?<br>
        * If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br>
        * How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br>
<br>
More information about the Swift evolution process is available at<br>
<br>
        <a href="https://github.com/apple/swift-evolution/blob/master/process.md" rel="noreferrer" target="_blank">https://github.com/apple/swift-evolution/blob/master/process.md</a><br>
<br>
Thank you,<br>
<br>
-Chris Lattner<br>
Review Manager<br>
<br>
<br>
_______________________________________________<br>
swift-evolution-announce mailing list<br>
<a href="mailto:swift-evolution-announce@swift.org" target="_blank">swift-evolution-announce@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution-announce" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution-announce</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div>