You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `stride(from:to:by)` function is misleading, as it never reaches the `to` value. When I go from A to B, I expect to end up at B, not stop just short of B.
I'd suggest using `towards` instead of `to`.
I suspect leaving it as is will be source of many bugs. I spent an hour tracking down a bug until I finally isolated the stride function as the issue and read the surprising documentation for this function.
The text was updated successfully, but these errors were encountered:
I'm not sure `towards` is better than `to`, seems differently misleading. `upToButNotIncluding` is what it really is, but my understanding is this is the fairly common meaning of `to` (as compared to `through`).
This should be raised as a question (and, eventually, a proposal pitch) on swift evolution, rather than filed as a jira. Closing as behaves correctly for now.
Additional Detail from JIRA
md5: e49795cfba6446e4efab625e4191fc75
Issue Description:
The `stride(from:to:by)` function is misleading, as it never reaches the `to` value. When I go from A to B, I expect to end up at B, not stop just short of B.
I'd suggest using `towards` instead of `to`.
I suspect leaving it as is will be source of many bugs. I spent an hour tracking down a bug until I finally isolated the stride function as the issue and read the surprising documentation for this function.
The text was updated successfully, but these errors were encountered: