> You may want to take a peek here: 
> https://gist.github.com/erica/a51a981ee0352235204692affa959307
>  
> -- E
>

Thanks for the link, Erica, very informative. The striding(by:) method combined 
with the (as of yet) non-canonical range types looks great; it also tackles 
half the problem, since it makes the use of reverse() no longer required in 
For-loops.

However, my main point remains unresolved, because

for i in (1...10).striding(by: -3)

is simply not as concise, readable, intuitive or elegant as

for i in 1...10 by -3

The "by" keyword is specifically meant to be syntactic sugar for the 
For-In-loop, and, as Vladimir pointed out, can easily be mapped onto the new 
striding() construct internally.

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

Reply via email to