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

Erica Sadun erica at ericasadun.com
Mon Mar 28 16:45:09 CDT 2016

> On Mar 28, 2016, at 3:25 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> on Mon Mar 28 2016, Xiaodi Wu <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> Right, Countable could refine Strideable. I'm no expert on this, but
>> some cursory reading suggests that the analogous feature in C++ simply
>> requires the type to have operator++ defined. Obviously, that won't
>> work for Swift 3.0...
> Hmm, instead of defining a new protocol (Countable), what if we just use
> “Strideable where Stride : Integer” as a constraint?

I like a differentiation between continuous and discrete things
although both can have ranges, membership, fences,
and a way to stride through them

-- E, just musing, not passing judgement on names

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160328/6272dd0e/attachment.html>

More information about the swift-evolution mailing list