on Fri Jul 01 2016, Haravikk <swift-evolution-AT-haravikk.me> wrote:

>> On 30 Jun 2016, at 23:39, Dave Abrahams <[email protected]> wrote:
>> All multi-pass sequences can benefit from subscripts.
>
> Sorry, not really what I meant, but rather; how many sequences are
> really going to use them?

The subscript and index aren't there for the sequence's benefit, and you
can't know how users will want to use the sequence.  The whole point of
making a type conform to a generic protocol is that you can't anticipate
all of the type's uses, so you want to make it work with as much other
code as possible.  If I'm defining a new sequence type, how can I know
whether someone might want to use index(of:) or slicing on it?

-- 
Dave
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to