[swift-evolution] Removing enumerated?

Erica Sadun erica at ericasadun.com
Thu Feb 2 22:51:44 CST 2017

> On Feb 2, 2017, at 9:46 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> On Jan 31, 2017, at 11:16 AM, Ben Cohen via swift-evolution <swift-evolution at swift.org> wrote:
>> As we expand (and maybe contract :) the standard library, this kind of question comes up a lot, so it is worth setting out some criteria for judging these “helper” methods. Here’s my take on such a list (warning: objectivity and subjectivity blended together in the below).
> This is great perspective Ben, thank you for taking time to write this up!
> It seems that you are leaning towards removing enumerated().  What do you think about the proposal of removing enumerated but adding indexed() to replace it?  It would provide the same behavior for common array cases, while providing more useful/defensible functionality for other collections.
> -Chris

https://gist.github.com/erica/2b2d92e6db787d001c689d3e37a7c3f2 <https://gist.github.com/erica/2b2d92e6db787d001c689d3e37a7c3f2>

This could easily be adapted to incorporate both the removal of enumerated as well as the addition of indexed, and I love the idea of using Ben's list as a template for the justification section, plus adding the feedback from this thread.

-- E

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170202/661584f9/attachment.html>

More information about the swift-evolution mailing list