- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Why is List the default Seq?
Fri, 2011-12-23, 10:07
Two days ago, I watched Daniel Spiewak's excellent Functional Data Structures talk. In that talk he mentions virtues of bitmapped vector trie. If Vector has so good performance characteristics for the common collection operations, why is List, and not Vector, the default Seq?
In case it isn't clear, the following is what I mean by List being a default Seq:
scala> Seq.range(1, 15)res112: Seq[Int] = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
--
Cheers,missingfaktor.
In case it isn't clear, the following is what I mean by List being a default Seq:
scala> Seq.range(1, 15)res112: Seq[Int] = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
--
Cheers,missingfaktor.
because vector is new, and seq is old.
-------- Original-Nachricht --------
> Datum: Fri, 23 Dec 2011 14:37:02 +0530
> Von: missingfaktor
> An: scala-user
> Betreff: [scala-user] Why is List the default Seq?
> Two days ago, I watched Daniel Spiewak's excellent Functional Data
> Structures talk. In that talk he mentions virtues of bitmapped vector
> trie.
> If Vector has so good performance characteristics for the common
> collection
> operations, why is List, and not Vector, the default Seq?
>
> In case it isn't clear, the following is what I mean by List being a
> default Seq:
>
> scala> Seq.range(1, 15)
> res112: Seq[Int] = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
>