-------- Original-Nachricht --------
> Datum: Fri, 30 Sep 2011 14:09:33 +0200
> Von: Edmondo Porcu <edmond...@gmail.com>
> An: scala-user <scala...@googlegroups.com>
> Betreff: [scala-user] Scala Arrays vs IndexedSeq
A "Scala Array" is a Java Array. It is a mutable data structure which
does not belong to any collection at all -- neither in Scala, nor in
Java. Scala adds some methods to it through an implicit conversion,
but it doesn't change it's basic characteristics.
Of particular note, an Array is the only parameterized data structure
on JVM which does not suffer from boxing, which provides it superior
performance in many ways.
IndexedSeq, on the other hand, is a trait in Scala extended by
collections which provide effective constant time indexed access to
their elements, and whose elements have their positions (their
indices) deterministically defined. There are generic, mutable and
immutable versions of this trait, and an implicit conversion from
Array to it.
--
Daniel C. Sobral
I travel to the future all the time.
-------- Original-Nachricht --------
> Datum: Fri, 30 Sep 2011 10:58:36 -0300
> Von: Daniel Sobral <dcso...@gmail.com>
> An: Edmondo Porcu <edmond...@gmail.com>
> CC: scala-user <scala...@googlegroups.com>
> Betreff: Re: [scala-user] Scala Arrays vs IndexedSeq