Default implementation for Seq() - documentation or implementation bug?

Hi,
I just saw that the documentation for scala.collection.Seq says that the default implementation for Seq() was Vector:
/** $factoryInfo *  The current default implementation of a $Coll is a `Vector`. *  @define coll sequence *  @define Coll Seq */object Seq extends SeqFactory[Seq] {
However, the implementation for immutable.Seq.newBuilder[A] is:
def newBuilder[A]: Builder[A, Seq[A]] = new mutable.ListBuffer

Is this a bug in the doc or in the code (I was expecting that Seq() was Vector based as the doc says)?
Eric.



Re: Default implementation for Seq() - documentation or impleme

It's a bug in the doc. Thanks for pointing it out!
 -- Martin

On Mon, Oct 24, 2011 at 1:25 AM, etorreborre <etorreborre [at] gmail [dot] com> wrote:
Hi,
I just saw that the documentation for scala.collection.Seq says that the default implementation for Seq() was Vector:
/** $factoryInfo *  The current default implementation of a $Coll is a `Vector`. *  @define coll sequence *  @define Coll Seq */object Seq extends SeqFactory[Seq] {
However, the implementation for immutable.Seq.newBuilder[A] is:
def newBuilder[A]: Builder[A, Seq[A]] = new mutable.ListBuffer

Is this a bug in the doc or in the code (I was expecting that Seq() was Vector based as the doc says)?
Eric.






--
Martin Odersky
Prof., EPFL and Chairman, Typesafe
PSED, 1015 Lausanne, Switzerland
Tel. EPFL: +41 21 693 6863
Tel. Typesafe: +41 21 691 4967

Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland