> On Jul 6, 2016, at 20:41, Dave Abrahams via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> There is no way, AFAIK, to implement important algorithms like rotate
> binarySearch and several others, without having some representation of
> position within a collection.

Do you need indices to be explicitly comparable for that, or will simply being 
able to test for equality and being within a "range" work? I realize that in 
most cases, testing an index for being in a range implies comparable, but what 
about multi-dimensional indices? Comparison isn't well defined for, say, 2D 
points, but in theory all the points within a circle or something  could be the 
indices for something.

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

Reply via email to