<div dir="ltr">yes, swift already has forEach, but from my point of view, there is an uncomfortable part, like &#39;(0..&lt;10).forEach{}&#39;. like Range type to need wrap it in parentheses for using forEach.<div><br></div><div>my suggestion is not replacing &#39;for in [] {}&#39; to &#39;for [] {}&#39;. Can not we have both? Of course, by erasing one before, it gave an environment to make cleaner code easier for developers like me.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-29 1:38 GMT+09:00 Robert Bennett <span dir="ltr">&lt;<a href="mailto:rltbennett@icloud.com" target="_blank">rltbennett@icloud.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Isn’t this exactly like forEach, which is already in the language?<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; On Jul 28, 2017, at 12:32 PM, Jacob Williams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; This change would also make it so that for loops follow the same format as all other closures with variables.<br>
&gt;<br>
&gt; The downside is that this would break a TON of code. I don’t think that the amount of code this breaks would be worth the consistency. And as Alex mentioned, it is possible through .forEach<br>
&gt;<br>
&gt;<br>
&gt;&gt; On Jul 28, 2017, at 10:19 AM, Kwanghoon Choi via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello<br>
&gt;&gt;<br>
&gt;&gt; I found someone easy mistake using for in loop statement.<br>
&gt;&gt;<br>
&gt;&gt; Ex)<br>
&gt;&gt; var i = 0<br>
&gt;&gt; for i in 0..&lt;10 { }<br>
&gt;&gt; print(i)<br>
&gt;&gt;<br>
&gt;&gt; And this user expected print(i) is “10”<br>
&gt;&gt;<br>
&gt;&gt; Many experienced swift developers doesn’t misunderstand like this. But always someone is new comers, and I think this expression make misunderstand easy too.<br>
&gt;&gt;<br>
&gt;&gt; So why not like this?<br>
&gt;&gt;<br>
&gt;&gt; var I = 0<br>
&gt;&gt; for 0..&lt;10 { (i) in … }<br>
&gt;&gt;<br>
&gt;&gt; I think this is more understandable for loop expression.<br>
&gt;&gt;<br>
&gt;&gt; Best Regards<br>
&gt;&gt;<br>
&gt;&gt; - Jay Choi<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; swift-evolution mailing list<br>
&gt;&gt; <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
&gt;&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; swift-evolution mailing list<br>
&gt; <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
</div></div></blockquote></div><br></div>