[swift-evolution] Feature proposal: Range operator with step

Erica Sadun erica at ericasadun.com
Wed Apr 6 15:30:22 CDT 2016


> On Apr 6, 2016, at 2:17 PM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> Prohibiting StrideTo with floating-point ranges altogether would be
> distressing. IMO, it's plenty distressing that backwards
> floating-point StrideTo as it currently exists might go away.

I wouldn't suggest doing so. I'm just saying that for a half-open interval, there is no max value
so it makes no sense mathematically to have a first value and a negative step. You're not so restricted 
with:

* positive steps
* closed intervals

-- E



More information about the swift-evolution mailing list