Very strange bug on Streams and probably compiler
Lukas Renggli
renggli at gmail.com
Mon Mar 5 16:47:11 UTC 2007
> Also, FWIW, if you like the ANSI version, it is easy to implement.
> Here is a version using a dead forked dialect of Squeak; it should be
> easy to dust it off should anyone want. This version goes further
> than discussed in this thread, and even makes floats and large integers
> be immutable. :) The code is in islands.zip on the following page;
> look inside the zip for immutLits1.5.cs and immutLits2.2.cs.
>
> http://wiki.squeak.org/squeak/2074
In 3.8 and 3.9 there are 5 subclasses of String (Symbol, Byte and
Wide) and many more for ArrayedCollection. Your change would introduce
many read-only classes and lead to much duplicated code (ok, traits
would be a big help here).
Immutability should be an instance-level property and not special
class. Immutability is completely ortogonal to inheritance und
therefor should not abuse the inheritance mechanism. I know that a
change like this would require some deep changes to the object
representation in the VM. I just hope that someday somebody dares to
make the step from 3.x to 4.0 where something like that is maybe
possible ...
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
More information about the Squeak-dev
mailing list
|