[swift-evolution] [Proposal] Conventionalizing stride semantics

Brent Royal-Gordon brent at architechies.com
Wed Mar 2 03:20:28 CST 2016

> In other words, the contortion I must accept is this: "through"
> doesn't go with "stride", even though it should. Mentally rearrange to
> put "through" between start and end, moving the word "stride" after
> the end: 1 through 10, stride by 8. With this approach, I can
> understand why someone would name the two stride styles "to" and
> "through". Consider the typical (American?) English phrase "open Mon
> thru Fri, 9 to 5": Fri is included, but 5 is excluded.

So in other other words, the change from `stride(from: 1, to: 2, by: 0.1)` to `1.stride(to: 2, by: 0.1)` is the source of the problem and should be reversed.

(Sorry, pet peeve of mine.)

Brent Royal-Gordon

More information about the swift-evolution mailing list