<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div><br></div><div><br>Am 10.06.2016 um 17:22 schrieb Erica Sadun via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt;:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 10, 2016, at 8:02 AM, Xiaodi Wu 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 dir="ltr" class="">On Fri, Jun 10, 2016 at 7:18 AM, Haravikk <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@haravikk.me" target="_blank" class="">swift-evolution@haravikk.me</a>&gt;</span> wrote:<br class=""><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"><div style="word-wrap:break-word" class=""><div class=""><span class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">* The word "where" does not consistently imply `break` or `continue`. In current Swift, `where` implies `break` in the context of a `while` loop and `continue` in the context of a `for` loop. Some users intuitively guess the correct meaning in each context, while others guess the wrong meaning. Therefore, the only way to learn for sure what `where` means in any context is to read the rulebook. That, by definition, means that this is unintuitive.</div></div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">This is an argument for renaming the where keyword on for loops to be more clear, or to somehow integrate continue/break to be more explicit about what the developer intends for it to do.</div></div></div></blockquote><div class=""><br class=""></div><div class="">Sure: I conclude that the keyword should be *either* removed *or* reformed; both outcomes could address the issue.</div></div></div></div></div></blockquote><div><br class=""></div>This is my stance as well and I reserve the right to flit between both choices until we've fully talked it through.</div><div><br class=""></div><div>One more data point.&nbsp;</div><div><br class=""></div><div>In the standard library there are just under 950 uses of "for in loops". There are 3 uses of "for in while" :</div></div></blockquote><div><br></div>How many of the 950 "for in loops" use a guard with continue? Only these can be compard with the "for in where loops".<div><br></div><div>-Thorsten&nbsp;</div><div><br><blockquote type="cite"><div><div><br class=""></div><div><div><font face="Menlo" class="">private/StdlibUnittest/StdlibUnittest.swift.gyb: &nbsp; &nbsp;for j in instances.indices where i != j {</font></div><div><font face="Menlo" class="">public/core/Algorithm.swift: &nbsp;for value in rest where value &lt; minValue {</font></div><div><font face="Menlo" class="">public/core/Algorithm.swift: &nbsp;for value in rest where value &gt;= maxValue {</font></div><div class=""><br class=""></div><div class="">-- Erica</div><div class=""><br class=""></div></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></body></html>