This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Moving scala.Array to scala.collection.mutable?

2 replies
soc
Joined: 2010-02-07,
User offline. Last seen 34 weeks 5 days ago.

Hi everyone!

While I think it isn't quite that important, moving Array to the right
package would be a small, but nice cleanup.
It would honor the significant efforts and improvements made to
integrate it seamlessly into the collection framework by the developers.

It would be comparable to what happenend when scala.List moved to
scala.collection.immutable for 2.8 and appropriate aliases were added to
Predef/the package object.

Further thoughts are also in this enhancement ticket:
http://lampsvn.epfl.ch/trac/scala/ticket/4343

What do you think?

Thanks,

Simon

ichoran
Joined: 2009-08-14,
User offline. Last seen 2 years 3 weeks ago.
Re: Moving scala.Array to scala.collection.mutable?
Array doesn't inherit from anything in the collections hierarchy, much less the mutable side, and it's treated specially by the JVM.  Therefore, I think it doesn't belong in the collections hierarchy.  Its wrappers belong, and that's exactly where you find them.  ("WrappedArray" for example.)

Array could be moved, but into collections.mutable seems like the wrong place to me.

  --Rex

On Thu, Mar 17, 2011 at 1:50 PM, Simon Ochsenreither <simon [at] ochsenreither [dot] de> wrote:
Hi everyone!

While I think it isn't quite that important, moving Array to the right package would be a small, but nice cleanup.
It would honor the significant efforts and improvements made to integrate it seamlessly into the collection framework by the developers.

It would be comparable to what happenend when scala.List moved to scala.collection.immutable for 2.8 and appropriate aliases were added to Predef/the package object.

Further thoughts are also in this enhancement ticket: http://lampsvn.epfl.ch/trac/scala/ticket/4343

What do you think?

Thanks,


Simon

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Moving scala.Array to scala.collection.mutable?

On 3/17/11 10:56 AM, Rex Kerr wrote:
> Array could be moved, but into collections.mutable seems like the wrong
> place to me.

I would be stunned if moving it is anything but an absolute non-starter.
There does come a point when you have to learn to start living with
things. (Not to mention I think it's exactly where it belongs.)

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