<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Most of your proposal look great to me! Comments inline:</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 23 Jun 2016, at 09:19, Brent Royal-Gordon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">As previously <strike class="">threatened</strike> mentioned, I've written a draft proposal to fix a number of naming issues with APIs operating on the beginning and end of Sequences and Collections:</div><div class=""><br class=""></div><div class="">• Inconsistent use of `prefix`/`suffix` vs. `first`/`last`</div><div class="">• Confusing naming of `drop` methods</div><div class="">• Ambiguous naming of `index(of:/where:)` and `drop(while:)`</div><div class="">• `prefix(upTo:)`, `prefix(through:)`, and `suffix(from:)` shouldn't be part of this family at all</div><div class=""><br class=""></div><div class="">To fix this, I propose:</div><div class=""><br class=""></div><div class="">• Renaming all methods which operate on more than one element at the beginning/end to use "prefix" or "suffix", not "first" or "last"</div><div class="">• Renaming `index(of:/where:)` to `earliestIndex(…)` and `first(where:)` to `earliest(where:)`</div><div class="">• Renaming the `drop` methods to use `removing`</div></div></div></blockquote><div class=""><br class=""></div><div class="">+! Everything above, I strongly agree with!</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">• Redesigning `prefix(upTo:)`, `prefix(through:)` and `suffix(from:)` as subscripts with "partial" ranges, like `people[..<idx]` or perhaps `people[nil..<idx]`.</div></div></div></blockquote><div class=""><br class=""></div><div class="">I’m not a fan of the subscript solutions. They both introduce new types which seems very heavyweight for such a small use case. I’d vote for keeping the current functions.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">Since that last point requires significant redesign, including the introduction of new types, I have also included an alternative design which uses `people[to: idx]` instead.</div><div class=""><br class=""></div><div class="">This proposal does not seek to add new functionality; it merely renames or (in the case of the "aggressive" subscript option) redesigns existing functionality. I do, however, discuss (without making many judgements about their wisdom) how these changes might affect the naming of functionality we might add in future versions of Swift.</div><div class=""><br class=""></div><div class="">I would mainly like feedback on the two most open questions left in this proposal:</div><div class=""><br class=""></div><div class="">• The choice of `removing` to replace `drop`</div></div></div></blockquote><div class=""><br class=""></div><div class="">Yep, heavily agree with you on `removing`.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">• The decision about whether to use `people[..<idx]`, `people[nil..<idx]`, or `people[to: idx]`.</div></div></div></blockquote><div class=""><br class=""></div><div class="">None of the above, as stated previously :)</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">But I'd also like comments on the rest of the proposal, and on whether I should split the prefix(upTo:/through:)/suffix(from:) changes into a separate proposal from the rest.</div><div class=""><br class=""></div><div class="">I suspect this will cause a firestorm of bikeshedding, so please try to keep your suggestions grounded. Don't just suggest a name; articulate why it's a better choice than what we already have or what this proposal suggests. Only you can prevent our first *three*-hundred-message bikeshedding thread.</div><div class=""><br class=""></div><div class="">Thanks for your attention!</div><div class=""><br class=""></div><div class="">(P.S. The proposal below includes several huge tables which may cause some mail clients to become very pouty and refuse to eat their supper. You may want to read the proposal at <<a href="https://gist.github.com/brentdax/024d26c2b68b88323989540c06261430" class="">https://gist.github.com/brentdax/024d26c2b68b88323989540c06261430</a>> instead.)</div></div></div></blockquote></div></body></html>