[swift-evolution] Let range operators always return empty ranges if the upper bound is smaller than the lower bound.

Dave Abrahams dabrahams at apple.com
Thu Jan 21 15:28:19 CST 2016


on Tue Jan 19 2016, Uwe Falck <swift-evolution at swift.org> wrote:

> I’m looking for feedback on this request if its worth to start an evolution proposal.
>
> Let range operators always return empty ranges if the upper bound is
> smaller than the lower bound.

I'd just like to point out that any proposal for changing the way ranges
work should account for the consequences of the model being explored in
https://github.com/apple/swift/blob/master/test/Prototypes/CollectionsMoveIndices.swift.
We are very much hoping to adopt this model for indexing in the near
future, and it has deep effects on the concept of what an Index is, and
consequently, what a range is, too.

Cheers,
Dave



More information about the swift-evolution mailing list