[swift-evolution] [SHORT Review] SE-0132: Rationalizing Sequence end-operation names

Brent Royal-Gordon brent at architechies.com
Tue Jul 26 19:45:35 CDT 2016


> On Jul 26, 2016, at 3:51 PM, Jose Cheyo Jimenez via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I think we are missing some sort of diff to show the impact of this proposal similar to what we had for the “grand renaming"

The proposal itself shows the impact.

* Full list of renamed methods: <https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md#sequence-end-operations-1>

* New patterns for redesigned `prefix(upTo/through:)` and `suffix(from:)` APIs: <https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md#impact-on-existing-code>

* Source-compatible method/subscript signature changes to work with RangeExpression: <https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md#index-based-operations-1>

Compared to the Great Renaming, this proposal has a tiny footprint:

• 11 methods renamed, with stubs for @available attributes left in extensions on Sequence or Collection
• 3 methods removed (replaced with new subrange syntax)
• 2 types and 6 operators added for incomplete ranges
• 1 protocol added for RangeExpression
• 2 subscripts and 2 methods in 3 protocols changed to work with RangeExpression

I'm working on an implementation (so far I just have `dropFirst` renamed, but I've only spent about half an hour on it, mostly waiting for tests), but the diff isn't really going to tell you much.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list