[squeak-dev] immutability

Frank Shearar frank.shearar at angband.za.org
Wed Mar 17 14:56:05 UTC 2010


Randal L. Schwartz wrote:
> Has anyone looked at, proposed, implemented object immutability?
> Obviously, it would require a VM change.
> 
> It would make database proxy objects a bit easier, because they could be
> marked immutable to throw an exception during the first write, so they could
> be marked dirty (and then mutable) to write back before finalization.
> 
> I know VWST has something like this, and I think GemStone does as well.

Googling a bit shows "sourcery" telling the comp.lang.smalltalk that 
Chronos (http://www.chronos-st.org/) does. Or did. Back in 2005, at any 
rate:

"An example of the Immutable Object Design Pattern implemented in
Smalltalk can be seen in the Chronos Date/Time Library
(http://www.chronos-st.org). After installing Chronos, see the class
comment of the class Immutable."

frank



More information about the Squeak-dev mailing list