> On Jan 30, 2017, at 11:35 AM, Dave Abrahams via swift-evolution
> <[email protected]> wrote:
>
> Why should that be out-of-bounds? Whether it is out-of-bounds would
> depend on what items is. If it's an array, that should be equivalent to
>
> let x = items[items.startIndex..<items.endIndex]
It seems to me that `items[0…]` would be equivalent to `items[0…Int.max]` if
we’re going to treat `0…` as an “infinite" range, no? Otherwise, we’re either
giving subscript of InfiniteRange types special behavior or we’re making
subscript ignore past-the-end indices; `”hello”.characters[0…10]` would need to
return the same as “hello”.characters[0…4]` to be consistent.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution