Look at that code:
var i:Int = 0
for i in (0..100){        ///...        if (i == 50)
        {
               break        } 
}

print("i=\(i)")

What is the value of i ?? Please remove this nonsense from the language unless 
you are happy to see it job interview questions in future :) My suggestion is 
to use the variable i in the loop instead of making hidden init of another "i" 
for the loop. 

Everything that is hidden = evil. It is not saving time but creating bugs. Code 
should be clear and understandable from first view...
 
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to