Skip to content

Commit 428642a

Browse files
committed
Explain specific changes in later strawman proposals
... relative to CollectionStrawman1.
1 parent 298a3e8 commit 428642a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/strawman/collections/CollectionStrawMan4.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import annotation.tailrec
1212
* strengths and weaknesses of different collection architectures.
1313
*
1414
* For a test file, see tests/run/CollectionTests.scala.
15+
*
16+
* Strawman4 is like strawman1, but built over views instead of by-name iterators
1517
*/
1618
object CollectionStrawMan4 {
1719

src/strawman/collections/CollectionStrawMan5.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ import annotation.tailrec
1212
* strengths and weaknesses of different collection architectures.
1313
*
1414
* For a test file, see tests/run/CollectionTests.scala.
15+
*
16+
* Strawman5 is like strawman4, but using inheritance through ...Like traits
17+
* instead of decorators.
18+
*
19+
* Advantage: Much easier to specialize. See partition for strict (buildable) collections
20+
* or drop for Lists.
21+
*
22+
* Disadvantage: More "weird" types in base traits; some awkwardness with
23+
* @uncheckedVariance.
1524
*/
1625
object CollectionStrawMan5 {
1726

0 commit comments

Comments
 (0)