[swift-evolution] [Pitch] Retiring `where` from for-in loops

Brent Royal-Gordon brent at architechies.com
Tue Jun 14 16:38:07 CDT 2016


> What about just this?
> for i % 2 == 0 in sequence { ... }
> 
> The first new identifier gets to be the index variable and subsequent new identifiers are errors.

If that weren't a syntax error, I would expect it to loop over `[true, false, true, false, …]`.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list