on Mon Mar 28 2016, Dave Abrahams <swift-evolution@swift.org> wrote:

> on Mon Mar 28 2016, Erica Sadun <swift-evolution@swift.org> wrote:
>
>>> On Mar 28, 2016, at 3:54 PM, Dave Abrahams via swift-evolution 
>>> <swift-evolution@swift.org> wrote:
>>> 
>>> 
>>> on Mon Mar 28 2016, Erica Sadun <swift-evolution@swift.org> wrote:
>>> 
>>
>>>>> On Mar 28, 2016, at 3:25 PM, Dave Abrahams via swift-evolution
>>>>> <swift-evolution@swift.org> wrote:
>>>>> 
>>>>> 
>>>>> on Mon Mar 28 2016, Xiaodi Wu
>>>> 
>>>>> <swift-evolution@swift.org
>>>>> <mailto:swift-evolution@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
>>> 
>>> Strideable where Stride : Integer expresses just exactly that.  Now if I
>>> could only get the type-checker to cooperate...
>>
>> I am ridiculously excited about what you're doing there. 
>> Looking forward to beautiful floating point strides if for no
>> other reason than I can point out how well they work for math
>> in comparison to traditional for;;loops, so maybe people will
>> stop burning semicolons on my lawn.
>
> The basics:
> https://github.com/apple/swift/commit/a5c3c63c3d5d940f729c23aab342ea4d270d264a

Hi Erica,

After some consideration, while I want to see the smart
(x..<y).striding(by: z) stuff happen too, it's somewhat incidental to
the (already massive) project we're undertaking in this branch.  Would
you like to take on the implementation and/or proposal?  I'd be happy to
provide guidance.

-- 
Dave

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to