on Thu Apr 14 2016, Hans Huck <[email protected]> wrote: > Dave Abrahams via swift-evolution <swift-evolution@...> writes: > >> >> If I thought extreme concision was important for this application, I'd be >> proposing something like >> >> for x in 0.0..<20.0//1.3 {} >> >> but personally, I don't, >> > And that is why exactly? The For-loop is at the very core of the language > and one of its most frequently used structures. Any unnecessary noise should > be avoided here. > >> which is why I propose `.striding(by: x)` >> rather than simply `.by(x)`, the latter being more open to >> misinterpretation. >> > Please elaborate. How could > > for i in (1...10).by(3) > > possibly be misinterpreted?
(p1..<p2).by(lineCount) Doesn't exactly tell me what role lineCount is playing or what "by" does. Maybe it means give me the range sorted by line count. In this case a little more verbosity can be the difference between understandable and unmistakable. -- Dave _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
