[swift-evolution] Separating the finite-vs-infinite distinction from single-vs-multi-pass

Matthew Johnson matthew at anandabits.com
Wed Jul 6 19:58:56 CDT 2016



Sent from my iPad

> On Jul 6, 2016, at 6:50 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> on Wed Jul 06 2016, Dave Abrahams <dabrahams-AT-apple.com> wrote:
>> 
>> Finally, as mentioned earlier we could easily supply a protocol that
>> makes it no harder than conforming to IteratorProtocol is.  You don't
>> even need to make your iteration state equatable because we can compare
>> counters stored in the indices.  I'll post a gist illustrating this
>> today.
> 
> https://gist.github.com/dabrahams/7629347b76c8d87ce8278e68ae70469f

Thanks for sharing!  It's great to have a clear and concise example showing how easy it can be to support Collection.  

We should keep the the Comparable requirement and probably drop Sequence.

I plan to comment on finite vs infinite but want to see the rest of the plans the library team is working before I do so.

Matthew

> 
> Enjoy,
> 
> -- 
> Dave
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list