[swift-evolution] Proposal: Remove the underscore and `in` for `for` loop

Adrian Zubarev adrian.zubarev at devandartist.com
Fri Jul 1 03:01:37 CDT 2016


Additive idea, but +1 for looping on ranges without the need on an index.



-- 
Adrian Zubarev
Sent with Airmail

Am 1. Juli 2016 um 09:39:23, Diego Barros via swift-evolution (swift-evolution at swift.org) schrieb:

When you want a simple `for` loop, for example:

for _ in 1...10 {

// do something 10 times

}



Clean-up and simplify the syntax by removing the superfluous underscore and `in`:



for 1...10 {

// do something 10 times

}


-- diego
_______________________________________________
swift-evolution mailing list
swift-evolution at swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160701/c1a43153/attachment.html>


More information about the swift-evolution mailing list