<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=""><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="-webkit-text-stroke-width: initial; font-size: 12px;" class="">Yes, I am back because I should not leave because I might be afraid for </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">negative reactions on what I write. <span style="-webkit-text-stroke-width: initial;" class="">I try to write and respond as civilized as </span></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="-webkit-text-stroke-width: initial; font-size: 12px;" class="">possible and never intended as personal, unless it really is. However there was one </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">person taking wat I wrote personally so I wrote back very friendly that it was not. </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="-webkit-text-stroke-width: initial; font-size: 12px;" class="">No response, twice. It is not very nice to be ignored when you really make a real effort</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">trying to resolve a misunderstanding. It upset me. that's why I left.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Needed time to recover. The problem lies by The Other One, no longer by me.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Ok, sorry for overreacting.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Please ==snip== the above paragraph (and this line) when responding so that it doesn't propagate through</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Swift-evolution. It doesn't belong there after this. Thanks.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">As most colleagues (that's what I think you all are, spanning two generations :o) </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">might have noticed, I am not exactly happy with the removal of the classical </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">for-loop ( for ;; ) but the damage has been done, so I will soon </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">present a proposal for a better alternative. Working on it.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">I find this matter very important.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">I do not agree with the for-loop removal proposal authored by Erica Sadun,</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Important: </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">I would like to emphasize again that what I write is not intended personally. </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Also I realize that I am a bit late on this subject, but that is because I was not here back then.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">I wil go through it point by point and try to explain why IMHO I think this is not a good proposal. </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">---------------------</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Evaluating proposal SE-0007</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Remove C-style for-loops with conditions and incrementers</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>•<span class="Apple-tab-span" style="white-space:pre">        </span>Proposal:<span class="Apple-tab-span" style="white-space:pre">        </span>•<span class="Apple-tab-span" style="white-space:pre">        </span>Author(s): Erica Sadun</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><b class=""></b><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><b class=""></b><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">"The C-style for-loop appears to be a mechanical carry-over from C rather than a genuinely Swift-specific construct."</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Could you explain to me why what, in your view, is </span></div><div style="margin: 0px; line-height: normal;" class=""><font color="#0433ff" style="font-size: 12px;" class=""><span style="-webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""> - a "genuinely Swift-specific construct</span><span style="-webkit-text-stroke-color: rgb(4, 51, 255);" class="">”</span><span style="-webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""> ?</span></font></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><span style="-webkit-text-stroke-width: initial;" class=""> - "not very Swift-like" ?</span><span style="-webkit-text-stroke-width: initial;" class=""> </span></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><span style="-webkit-text-stroke-width: initial;" class="">- "Swift-typical</span>”<span style="-webkit-text-stroke-width: initial;" class=""> ?</span></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">"It is rarely used and not very Swift-like."</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">This is definitely not true. </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">The classical for loop is one of the most frequently used language constructs in most programming languages.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">"More Swift-typical construction is already available with for-in statements and stride." </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Except for collections, these are inconvenient, cumbersome and inefficient "work arounds" as described later in my comments in this email.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">"Removing for loops would simplify the language."</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Removing screw drivers from a toolbox would indeed simplify the toolbox.</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">So would removing closures, classes, protocols etc. from Swift.</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Simplification of a programming language can also have its disadvantages. </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">" And starve the most common use-points for -- and ++, which are already due to be eliminated from the language."</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">"The value of this construct is limited and I believe its removal should be seriously considered"</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">There absolutely is no need to remove the for ; ; and also ++ -- from the language. These can perfectly well co-exist with other language elements of Swift. If you don't want to use them, that's fine, but for most people out there who still want to use the for ;; and ++ -- . </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">"Swift design supported a shallow learning curve using familiar constants and control structures. </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">The for-loop mimics C and limits the effort needed to master this control flow."</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Yes indeed. It mimics C and also the for-loop or its equivalent in more that 20 other programming languages.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><b style="font-size: 12px;" class="">"Disadvantages of For Loops</b></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-size: 12px;" class=""><font style="-webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>1<span class="Apple-tab-span" style="white-space:pre">        </span>Both for-in and stride provide equivalent behavior using Swift-coherent approaches without being tied to legacy terminology</font>”</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Most language elements in Swift ARE legacy, and that's ok, so one does not have to re-invent the wheel again. <span style="color: rgb(0, 0, 0); -webkit-text-stroke-color: rgb(0, 0, 0);" class=""> </span></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>"2<span class="Apple-tab-span" style="white-space:pre">        </span>There is a distinct expressive disadvantage in using for-loops compared to for-in in succinctness"</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">What makes you think so? </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-size: 12px;" class=""><font style="-webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>"3<span class="Apple-tab-span" style="white-space:pre">        </span>for-loop implementations do not lend themselves to use with collections and other core Swift types.</font>”</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Agreed if it concerns collections. However, they can. Of course, it is much easier and more readable to use e.g. 'for item in items" for collections.</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Please enlighten me: what "other core-Swift-types" do you refer to? </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>"4<span class="Apple-tab-span" style="white-space:pre">        </span>The for-loop encourages use of unary incrementors and decrementors, which will be soon removed from the language."</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Although the majority of programmers like the ++ and -- operators, I do manage to understand why some do not like it. However ++ and -- are very well suited for classical for-loops, in fact they even make them more readable... Like so:</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> 1. for i = 0; i < iterations; i++ { ...}</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">or </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> 2. for i = 0; i < iterations; i += 1 { ...}</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">It looks like the first example is more readable. But yes, if it were that the ++ -- would have remained in Swift, and also the classical for-loop, using ++ and -- should probably restricted to be used in for-loops only. </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>"5<span class="Apple-tab-span" style="white-space:pre">        </span>The semi-colon delimited declaration offers a steep learning curve from users arriving from non C-like languages."</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">IMHO, this is utter nonsense. Even from those coming from other languages as C++, C, if a mere three arguments separated by two semicolons are "a steep learning curve" ? Then what to think about using closures, lambda's, classes, inheritance, functional programming, protocols etc. ?</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><b class=""></b><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><b style="font-size: 12px;" class="">"Impact on existing code</b></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">A search of the Apple Swift codebase suggests this feature is rarely used."</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">A search of the Apple Swift codebase is not representative, because the scope of this search encompasses only source code made by users of the programming language Swift, which is partly still under further development. Faithfully representative would it be to search in a wider perspective, which should include source code written in variety of programming languages like Objective-C, Java, C#, C++, C, PHP , Ruby, Go, Perl, Javascript, Dart, V. Basic, Pascal, PL/1, Cobol, Rexx. Most of this languages have implemented the for-loop (or equivalent) . Undoubtedly if one would do a search for for-loop in these languages it would become clear that the for-loop is heavily used. </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">As a result of removing the classical for loop it is to be expected that lot of people might consider thinking twice about switching to Swift, If they have to live without (or cumbersome work around) language elements that have proven to be very useful for at least a few decades...</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">How do you arrive at such a conclusion? In this perspective, Erica, I am very much interested to know if you have practical experience with using other programming languages than Objective C and Swift. Have you built solid applications with other systems, IDEs and languages? Also, did you consult programmers working with other well established languages? </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">"Community members of the Swift-Evolution mail list confirm that it does not feature in many pro-level apps and can be worked around for those few times when for-loops do pop up."</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">If one browses through the App Store, one might notice that most apps work with collections <span style="-webkit-text-stroke-width: initial;" class="">(e.g. customers, addresses, shopping items, videos, songs. etc.) For these kind of applications, the for-in-collection statement in Swift is great and well catering for these requirements. The result of this is, that the majority of Swift developers will not be aware and not miss the classical for-loop (or a new Swift equivalent for it at all)</span><span style="-webkit-text-stroke-width: initial;" class=""> </span><span style="-webkit-text-stroke-width: initial;" class="">simply because they do not need it.</span></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">However, for those that make scientific, engineering, statistical, technical and game apps, the lack of a simple but versatile iteration statement, which in most cases can be compiled down to a simple and very fast assembler loop is nothing less than a disaster.</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">E.g. For the purpose of performance testing, in an Apple TV SceneKit app I am currently building, <span style="-webkit-text-stroke-width: initial;" class="">I did replace replace the classical for-loop by a "for in x.stride(..."</span><span style="-webkit-text-stroke-width: initial;" class=""> </span><span style="-webkit-text-stroke-width: initial;" class="">for coordinate calculations. </span><span style="-webkit-text-stroke-width: initial;" class="">Performance dropped to about 45%, this is unacceptable.</span><span style="-webkit-text-stroke-width: initial;" class=""> </span><span style="-webkit-text-stroke-width: initial;" class="">The compiler cannot get rid of this. Working with a collection based for-in will nearly always be twice as slow, for the simple reason that the contents of the collection it has to process are by definition unpredictable.</span><span style="-webkit-text-stroke-width: initial;" class=""> </span></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">In your proposal you offered the following example. I do not know where you found this horrible piece of code. However, in this case it is not the for-loop that is so bad, but the complete function. There are many better and well structured classical for-loops to be found everywhere. I cannot deflect my impression that you might have selected this particularly bad example solely to amplify your proposal's case. </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class="">"</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">char *blk_xor(char *dst, const char *src, size_t len)</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">{</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> const char *sp = src;</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> for (char *dp = dst; sp - src < len; sp++, dp++)</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> *dp ^= *sp;</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> return dst;</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">}</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class="">"</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Again, this is a extremely bad C Example, infested with (at least to me) unclear pointer usage. (Luckily in Swift there are (or should be) no pointers) Somewhere in this messy example, yes, a for-loop can be found. Notice that the for-loop itself is relatively simple and straightforward. Also, the fact that this for-loop deploys two value incrementors instead of one, is in this particular context not really all that bad. </span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">In my opinion, the Swift equivalent you offer, does not look much better:</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class="">"</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">func blk_xor(dst: UnsafeMutablePointer<CChar>, src:</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">UnsafePointer<CChar>, len: Int) -> UnsafeMutablePointer<CChar> {</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> for i in 0..<len {</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> dst[i] ^= src[i]</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> }</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class=""> return dst</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">}</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">A search of github's Swift gists suggests the approach is used primarily by those new to the language with minimal language skills and is abandoned as language mastery is achieved.</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class="">"</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Another subjective assumption and almost insulting for those, often with years of experience, who deploy the classical for-loop intensively and really knowing what they are doing.</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">My conclusion:</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Although the proposal has been accepted. I would like to see it withdrawn </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">because the arguments brought forward are highly subjective, </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">not thoroughly analyzed and in some cases even false. </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Furthermore, a proposal should be based on facts, not assumptions. </span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">Kind Regards</span></div><div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255); -webkit-text-stroke-color: rgb(4, 51, 255); -webkit-text-stroke-width: initial;" class=""><span style="font-size: 12px;" class="">TedvG.</span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><span style="font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class=""><br class=""></div></body></html>