[swift-evolution] [Pitch] Change the endIndex value for closed Ranges and Collections
Dave Abrahams
dabrahams at apple.com
Thu Mar 24 19:16:46 CDT 2016
on Thu Mar 24 2016, Howard Lovatt <swift-evolution at swift.org> wrote:
> Not sure what you are saying?
>
> for index in empty.indices {
> // never executed
> }
>
> Would still work.
Not every algorithm is based on a linear traversal (e.g. binary search,
sort, etc.) For those you really need to access startIndex and endIndex
independently.
--
Dave
More information about the swift-evolution
mailing list