Concrete collection type: ArrayBuffer
Base trait for strict collections
Base trait for collection builders
Base trait for instances that can construct a collection from an iterable
Base trait for generic collections
Base trait for companion objects of collections
Base trait for Iterable operations
Base trait for Iterable operations
VarianceNote
We require that for all child classes of Iterable the variance of
the child class and the variance of the C
parameter passed to IterableLike
are the same. We cannot express this since we lack variance polymorphism. That's
why we have to resort at some places to write C[A @uncheckedVariance]
.
Iterator can be used only once
A core Iterator class
Concrete collection type: List
Concrete collection type: ListBuffer
View defined in terms of indexing a range
Base trait for sequence collections
Base trait for Seq operations
Concrete collection type: String
Concrete collection type: View
A strawman architecture for new collections. It contains some example collection classes and methods with the intent to expose some key issues. It would be good to compare this to other implementations of the same functionality, to get an idea of the strengths and weaknesses of different collection architectures.
For a test file, see tests/run/CollectionTests.scala.
Strawman5 is like strawman4, but using inheritance through ...Like traits instead of decorators.
Advantage: Much easier to specialize. See partition for strict (buildable) collections or drop for Lists.
Disadvantage: More "weird" types in base traits; some awkwardness with