> On 30 Mar 2016, at 22:05, Ted F.A. van Gaalen via swift-evolution > <[email protected]> wrote: > > Again I need to emphasize very strongly that this for-loop really > has absolutely > nothing, nada, zilch, niente, nichts, niets, niks, rien, zero, nenio, > to do with the: > > for i in stride(…. > > or any other for in… variant working with collections.
Of course it does. Collection-based for loop can express exactly the same semantics, so why do you need a new construct when you already have a perfectly good one to do the job? > > but, once again - > provided you don’t want to do other operations > on the generated collection before iterating - > a collection is used here totally unnecessary, > which puts a burden on performance because the contents > of a collection are unpredictable I find it quite irritating that you keep repeating these untrue facts. Again: both for loops compile to exactly the same code. > It is also tedious to write and (as a matter of my personal taste) downright > ugly. Right, because for d in stride(from:10, to: 5, by: 0-.1, tolerance: 0.01) is that much more tedious to write than what you propose Best, Taras
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
