[squeak-dev] Immutability and become

Chris Muller asqueaker at gmail.com
Thu Jul 20 22:16:17 UTC 2017

I'm sure this has been discussed but...    since become only swaps
pointers, sending it to immutable object itself should be fine, as
long as all of the objects *referencing it* were not read-only, since
that would result in their being mutated..

> Or are you meaning that when an object is made immutable all its sub-state
> is made immutable too?  (An idea I have no problems with, provided it does't
> imply that classes can't change).

What is "sub-state" in a graph with cycles?  Probably best for low
level methods like this to operate on single objects.  Letting a
primitive like that operate an graphs would be too little control for
the framework.

More information about the Squeak-dev mailing list