<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class="">I’m going to add a +1 for Erica’s proposal. Here’s why:</div><div class=""><br class=""></div><div class="">1. For every situation in which the for loop could be used, a&nbsp;<i class="">for…in</i>&nbsp;(either with ranges or strides) or&nbsp;<i class="">while</i>&nbsp;loop could achieve the same goals.</div><div class=""><br class=""></div><div class="">2. For the vast majority of these cases, the&nbsp;<i class="">for…in</i>&nbsp;or&nbsp;<i class="">while</i>&nbsp;version is much cleaner and easier to read than&nbsp;<i class="">for(init;test;inc).</i> More extensive refactoring might be necessary in some cases, but in my opinion that effort would be worthwhile to improve readability and consistency.</div><div class=""><br class=""></div><div class="">3. For new programmers learning the language, the&nbsp;<i class="">for…in</i>&nbsp;is much easier to learn. To my understanding, this is a major goal of Swift. For those coming to Swift that have some experience with other languages, we should be guiding them towards the optimal Swift way of doing things. Letting those programmers use an inelegant, legacy feature “just because” does not seem to me to fit the goals of Swift. In addition, the&nbsp;<i class="">for…in</i> loop is not even a new Swift concept; many languages (including C++, and Objective-C, and Python) already have&nbsp;<i class="">for..in</i>&nbsp;style loops available.</div><div class=""><br class=""></div><div class="">4. To the comment that said "even that a feature isn't used doesn't mean that you need to remove that feature": I don’t agree. If a given feature is inferior to its alternatives <i class="">and is not actually in common use</i>, why not simplify the language and just remove it? I think many of us would agree that&nbsp;<i class="">for(init;test;inc)</i>&nbsp;loops fail the smell test we should be using: would we add this in Swift 3 if it didn’t already exist?</div><div class=""><br class=""></div><div class="">Lastly, I’d like to point out that I, too, had a knee-jerk negative reaction when I saw the already accepted proposal for removing ++ and --. After reading the rationale and discussion regarding that change, I completely changed my mind. I believe this proposal should accepted for similar reasons.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Liam</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Dec 6, 2015, at 10:33 AM, inbox only 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="">True,even that a feature isn't used doesn't mean that you need to remove that feature.<div class="">I hope that the proposal will be rejected.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2015-12-06 12:03 GMT+02:00 Clemens Wagner via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; We’ve developed a number of Swift apps for various clients over the past year and have not needed C style for loops either.<br class="">
<br class="">
But I think this is a very weak reason for *removing* any portion like C-loops and increment or decrement operators of a programming language. How about the developers and the productive code which used C-style loops already?<br class="">
<br class="">
I understand the reasons why you, Erica and the others don’t like C-style loops. But changing the philosophy of a productive programming language is a very bad idea.<br class="">
<br class="">
Cheers<br class="">
Clemens<br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=FWNXVkJEIvgBIPO6st52oaOhXz8A8SWiAS8uKJuLOYbI8Wi-2BjET-2BDMMLLIog8vAk-2Fh00wSsew2XPjIzVOwskzKs2lSgfsI5cs4iRtOZ1s4kF-2B7Wz-2BO1FnY97x9KPh8qf8K9T1B5C8ookrOPn0p4ZXYtM-2B1fB4TJKNOOz4U2oJPaNcZMKY1NRLp2quI5ePH17aNfNjxmZN5ZVnXrxIgtJRg-3D-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="">
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></body></html>