Hello

I found someone easy mistake using for in loop statement.

Ex)
var i = 0
for i in 0..<10 { }
print(i)

And this user expected print(i) is “10”

Many experienced swift developers doesn’t misunderstand like this. But always 
someone is new comers, and I think this expression make misunderstand easy too.

So why not like this?

var I = 0
for 0..<10 { (i) in … }

I think this is more understandable for loop expression. 

Best Regards

- Jay Choi
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to