Make scala.Seq = strawman.collection.immutable.Seq #149
Comments
Is this a step towards #179 ? |
Other non-immutable collection types in package object
|
Incidentally, if we're going to add immutable iterators, now would be the time to do it. They're annoying to use because the signature works out to be equivalent to
which imposes an additional burden of keeping track of the advanced state of the immutable iterator. But since we're thinking about an enhanced immutable interface, I thought it was worth raising. Note for those wondering about usage: immutable iterators are best consumed in tail-recursive methods, e.g.
and similar constructs. |
@szeiger agreed on all points |
@Ichoran what’s the advantage over pattern matching on |
could we move the immutable-iterator discussion to a new ticket? |
Further issues:
|
This "immutable iterator" looks like a Stream or LazyList to me, assuming |
In brief: immutable iterators don't cache anything (unlike |
I'd bias the other way: if you want to abstract over immutable and mutable collections you should have to use |
I wholeheartedly agree with @dwijnand. Everything else in |
Reopening because we might want to make |
(given the description of this ticket, maybe it's better to create a new one to track that) |
@dwijnand done! |
No description provided.
The text was updated successfully, but these errors were encountered: