> On Mar 25, 2016, at 4:09 PM, Brent Royal-Gordon via swift-evolution 
> <[email protected]> wrote:
> 
>> Question: by what unit should
>> 
>>       for d in d0...d2 {}
>> 
>> be iterating?  Or should it be disallowed without a .striding(by: )?
>> 
>> If the latter, NSDate might fall into the same bucket as floating types.
> 
> Floating-point seconds (as NSTimeIntervals) are the natural 
> Strideable.Stride, but it's not particularly clear to me that you want 1 
> second to be a default stride. It's the default you would guess, but it's not 
> actually a particularly useful default.

Any fixed-time-period stride with dates is fraught with peril. Not every day is 
24 hours, not every minute is 60 seconds, etc. Working with dates requires 
enough special domain knowledge that I think it'd be harmful to try to 
genericize numeric concepts over it.

-Joe
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to