<div dir="ltr">On Wed, Jun 15, 2016 at 4:58 PM, Dany St-Amant via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> Le 15 juin 2016 à 17:23, Jean-Daniel Dupas via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> a écrit :<br>
><br>
><br>
>> Le 13 juin 2016 à 17:26, Erica Sadun via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> a écrit :<br>
>><br>
>><br>
>>> On Jun 13, 2016, at 9:23 AM, let var go via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
>>><br>
>>> I am 100% with Charlie on this. Expressiveness has to do with the *effectiveness* of conveying a thought or a feeling.<br>
>>><br>
>>> Keep "where". It is expressive. It conveys a specific idea effectively and concisely.<br>
>><br>
>> For those of you in favor of retaining `where`, how do you feel about adding `while`, `until`, `unless`, etc?<br>
>><br>
>> — E<br>
><br>
> What I like is the possibility to iterate over a filtered list using a ‘single’ statement, not the keyword itself. If you propose to replace where by something less confusing, or add other keywords, I’m all for it.<br>
><br>
<br>
</span>For the folks who like the 'where' and do not like the 'guard .. else continue', (also considering in the equation the suggestion of renaming 'where' by 'if'). One can get the 'where' syntax without the 'where' at the cost of one indentation level and the set of curly braces.<br>
<br>
for element in dataArray {<br>
if condition {<br>
doWork()<br>
}<br>
}<br>
<br>
versus<br>
<br>
for element in dataArray where condition {<br>
doWork()<br>
}<br></blockquote><div><br></div><div>...and (not that I would advocate for this as the best style), you could simulate the keyword with a slightly funny indentation:</div><div><br></div><div>```</div><div>for element in dataArray { if condition {</div><div> doWork()</div><div>}}</div><div>```</div><div><br></div><div>(...and if we're counting letters typed as a metric for terseness, not that I would advocate that metric, `where` and `if {}` are both exactly five...) </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Dany, slowly shifting into the "what's the point of keeping 'where'" camp<br></blockquote><div><br></div><div>:)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div></div>