RunArray immutable?

Lukas Renggli renggli at gmail.com
Mon Feb 12 09:15:32 UTC 2007


> array := RunArray new: 5 withAll: 2.
> array at: 3 put: 5.
>
> However, the second line generated an error: "Instances of RunArray are not
> indexable". I don't see why, conceptually speaking, RunArray would be
> immutable. They should behave just like arrays in my opinion.
>
> Do you want to try to write #at:put: ?

Have a look at TextAndTextStreamTest. I think this is what the
RunArray is supposed to do (as opposed to what a generic collection
should be able to do).

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch



More information about the Squeak-dev mailing list