on Wed Jun 22 2016, Matthew Johnson <[email protected]> wrote:

>> E.g., the current Iterator could gain a
>> class constraint and become the only representation of single-pass
>> sequences.
>
> Hmm.  I would have to give this more thought.  Do we really want to
> require all conformances of `Iterator` to be reference types?  What
> would be the performance impact of that?

It's not necessarily a problem.  In almost any context where Iterators
are used they could be promoted by the optimizer from the heap to the
stack.

-- 
-Dave

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

Reply via email to