Very strange bug on Streams and probably compiler
Alan Lovejoy
squeak-dev.sourcery at forum-mail.net
Wed Feb 14 20:59:34 UTC 2007
<Lukas Renggli>
If we had an immutability bit, that the compiler would set for objects in
the literal array (and with what we could do a lot of other cool stuff),
then people would not run into such problems.
</Lukas Renggli>
As a principle of language design, literals should be immutable. And
immutability needs to be independently settable for each named instance
variable, and independently settable for the indexable slots (as a group,
not for each index.) The reason is because some named instance variables
may need to be "caching variables" whose values are lazily computed only
when needed--in fact, such variables may need to be weak references so that
the garbage collector can set them to nil.
--Alan
More information about the Squeak-dev
mailing list
|