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

Dave Abrahams dabrahams at apple.com
Thu Apr 14 11:53:39 CDT 2016


on Wed Apr 13 2016, Shawn Erickson <shawnce-AT-gmail.com> wrote:

> On Wed, Apr 13, 2016 at 4:45 PM Dave Abrahams via swift-evolution
> <swift-evolution at swift.org> wrote:
>
>     Updated proposal:
>     https://github.com/apple/swift-evolution/blob/master/proposals/0065-collections-move-indices.md
>
> I like the use of `location(...)` instead of `index(...)`. I strongly suggest
> that successor and predecessor become `location(after:)` and `location(before:)
> ` (or something like that) so that the index manipulation API are all similarly
> named. 

Interesting idea.  Predecessor and successor are more specific, because
the predecessor of the predecessor of i is still “before” i, but that
may not be a strong enough reason.

-- 
Dave


More information about the swift-evolution mailing list