[swift-evolution] [Review] SE-0065 A New Model for Collections and Indices

Stephan Tolksdorf st at quanttec.com
Fri Apr 15 15:30:29 CDT 2016


On 2016-04-12 Dmitri Gribenko via swift-evolution wrote:
> Not even to mention that
> indices are valid only in context of a particular collection instance,
> so in this model you could validate an index against one collection
> and use it with another one.

The proposal requires Index values to be Comparable. Does that mean that 
indices from different collection instances should be comparable i.e. 
have a strict total order?

And somewhat related: Is it safe in Swift (in contrast to C) to compare 
NativePointers into unrelated memory blocks?

- Stephan




More information about the swift-evolution mailing list