<div dir="ltr">+1, having to add an underscore in a <font face="monospace, monospace">X.times</font> loop always feels contrived.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 1, 2016 at 2:38 AM, Diego Barros via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default"><font face="monospace, monospace">When you want a simple `for` loop, for example:</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default">
<p><font face="monospace, monospace"><span>for</span><span> </span><span>_</span><span> </span><span>in</span><span> </span><span>1</span><span>...</span><span>10</span><span> {</span></font></p>
</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><p><font face="monospace, monospace">// do something 10 times</font></p></div></blockquote><div class="gmail_default"><p><font face="monospace, monospace">}</font></p><p><font face="monospace, monospace"><br></font></p><p><font face="monospace, monospace">Clean-up and simplify the syntax by removing the superfluous underscore and `in`:</font></p><p><font face="monospace, monospace"><br></font></p><p><font face="monospace, monospace"><span>for</span><span> </span><span>1</span><span>...</span><span>10</span><span> {</span></font></p></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_default"><p><font face="monospace, monospace">// do something 10 times</font></p></div></blockquote><div class="gmail_default"><p>
</p><p><span><font face="monospace, monospace">}</font></span></p></div><span class="HOEnZb"><font color="#888888"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="monospace, monospace"><br></font><div><font face="monospace, monospace">-- diego</font></div></div></div></div></div></div>
</font></span></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><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Joseph Bell<br><div><a href="http://dev.iachieved.it/iachievedit/" target="_blank">http://dev.iachieved.it/iachievedit/</a></div><div>@iachievedit</div></div></div></div></div>
</div>