[swift-evolution] [Pitch] Rename `index(of:)` and `index(where:)` to `firstIndex(of:)` and `firstIndex(where:)` respectively
Jose Cheyo Jimenez
cheyo at masters3d.com
Sun Jul 24 11:58:02 CDT 2016
Is your proposal going to make the swift3 window?
On Jul 24, 2016, at 8:23 AM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>> On Jul 24, 2016, at 2:58 AM, Tim Vermeulen via swift-evolution <swift-evolution at swift.org> wrote:
>> `firstIndex` is completely unambiguous, whereas with `index` people might wonder which index is returned. Also, if `lastIndex` methods ever get added to the standard library, they will be a lot more consistent with `firstIndex` than with `index`.
>> On the other hand, `index` is short and simple, and people might not care whether it is the first index that matches or a different one. Still I think `firstIndex` is more in line with the naming guidelines.
> Working on it! https://github.com/brentdax/swift-evolution/blob/09be1007c5138be2370f33d761b05b8b6700a9a3/proposals/NNNN-sequence-end-ops.md
> Brent Royal-Gordon
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution