<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 3, 2015, at 3:36 PM, Douglas Gregor <<a href="mailto:dgregor@apple.com" class="">dgregor@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 3, 2015, at 3:32 PM, Erica Sadun <<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Does Swift still needs C-style for loops with conditions and incrementers? <div class=""><br class=""></div><div class=""><div class=""><span id="cid:DD165597-A2B6-4AFA-8A16-3C9B7D693408@hsd1.co.comcast.net" class=""><Screen Shot 2015-12-03 at 4.30.15 PM.png></span></div><div class=""><br class=""></div><div class="">More Swift-like construction is already available with <i class="">for-in</i>-statements and <i class="">stride</i>. </div><div class="">This would naturally starve the most common point for -- and ++ operators as well.</div></div></div></div></blockquote><br class=""></div><div class="">My intuition *completely* agrees that Swift no longer needs C-style for loops. We have richer, better-structured looping and functional algorithms. That said, one bit of data I’d like to see is how often C-style for loops are actually used in Swift. It’s something a quick crawl through Swift sources on GitHub could establish. If the feature feels anachronistic and is rarely used, it’s a good candidate for removal.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div class=""><br class=""></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=aEV7ctwDx5JMbO5IT0R-2F-2Fi-2FIc4mR8uN1H-2FRPAs6LeFcJb7dp1qHaIiDkNc8A36vpr29VlFFpfgNjFjmlzZF9YFZmog-2BocUjpjLb9sJr-2FnPGnvSK511eoz8aStvOUomyl8fBfqGi3SQShX-2FYwTg1D8BHmTl0U1GAL6K4v1qXlpdh37sqX-2BRMlvYTGZIiEszjk-2FADdWRdp0HWoCJj30JYYXZ4kWQu-2B-2BAuJcAJ2sbXYfxw-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote><br class=""></div><div>Every time I’ve used a C-style for loop in Swift it was because I forgot that .indices existed. If it’s removed, a fixme pointing that direction might be useful.</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>David</div><br class=""></body></html>