<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr"><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5283" class="">> I get this</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5285" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5287" class="">> </span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5289" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5291" class="">> var i:Int = 0</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5293" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5295" class="">> for i in (0..<len)</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5297" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5299" class="">> {</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5301" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5303" class="">> //do something</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5305" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5307" class="">> }</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5309" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5311" class="">> </span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5313" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5315" class="">> ....</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5317" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5319" class="">> </span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5321" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5323" class="">> for i in (0..<len)</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5325" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5327" class="">> {</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5329" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5331" class="">> if something is true</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5333" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5335" class="">> {</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5337" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5339" class="">> break</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5341" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5343" class="">> }</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5345" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5347" class="">> }</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5349" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5351" class="">> </span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5353" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5355" class="">> use i ??</span><br clear="none" style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5357" class=""><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym18_1_1458796199865_5359" class="">> What is i now :) !!!!</span><br></div><div id="yui_3_16_0_ym18_1_1458796199865_4959"><br></div><div id="yui_3_16_0_ym18_1_1458796199865_4959">Yes and it is extremly confusing sintax..... and you may create such bug without even notice just by changing the old C style for cycles. </div><div id="yui_3_16_0_ym18_1_1458796199865_4959"><br></div><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr">I am still new to SWIFT (2 months). Here is what I thing</div><div id="yui_3_16_0_ym18_1_1458796199865_4959"><br></div><div id="yui_3_16_0_ym18_1_1458796199865_4959">1. Breaking existing code meens that swift is still in beta and one should always think twice before investing in big project.</div><div id="yui_3_16_0_ym18_1_1458796199865_4959"><br></div><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr">2. swift has no clear vision of "for" cycles. All cycles resemble "while" cycle when compiled to CPU instructions and can be implemented with while loop. Pascal had a limited for cycles just for easy enumeration. C on the other hand has much more capable for cycles that suited many cases. From what I read there is no clear idea about "for" in swift. They have to write down the scenarios they want to cover and and offer ONE syntax for them all. Having a different syntax for different C scenarios is confusing - better leave the C syntax. </div><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr">3. swift has hidden function calls like C# - that affects the code performance in an unexpected way. Function calls are expensive in ARM architecture and they should be avoided in loops. So this leads to the arrays. Swift is slow beacause reading and changing array members is slow and that is what usually is made in loops. There should be no hiden function calls there. I may suggest using UnsafeMuttablePointer to create a new fast array class or struct and add it into the language for everyone to use.</div><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr">4. writing many things in one line is BAD in million lines projects. It is called "compressed logic" - leads to bugs, and slow code maintenance. Swift closers are becoming really messy at this point so some rules against compressed logic are needed.</div><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458796199865_4959" dir="ltr">5. There are many great things in swift that I have not seen anywhere else like swift functions, interaction with C code, dictionaries and more and more. So I have a strong believe in the swift development team .<br id="yui_3_16_0_ym18_1_1458796199865_8245" class=""></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Thursday, March 24, 2016 5:59 AM, Brent Royal-Gordon <brent@architechies.com> wrote:<br></font></div> <br><br> <div class="y_msg_container">> I get this<br clear="none">> <br clear="none">> var i:Int = 0<br clear="none">> for i in (0..<len)<br clear="none">> {<br clear="none">> //do something<br clear="none">> }<br clear="none">> <br clear="none">> ....<br clear="none">> <br clear="none">> for i in (0..<len)<br clear="none">> {<br clear="none">> if something is true<br clear="none">> {<br clear="none">> break<br clear="none">> }<br clear="none">> }<br clear="none">> <br clear="none">> use i ??<br clear="none">> What is i now :) !!!!<br clear="none"><br clear="none">The outer `i` is 0 because it was never used. The expression `for i in...` implicitly declares a new `i`.<div class="yqt6093817597" id="yqtfd57371"><br clear="none"><br clear="none">-- <br clear="none">Brent Royal-Gordon<br clear="none">Architechies<br clear="none"></div><br><br></div> </div> </div> </div></div></body></html>