> It might be interesting to define something like Common Lisp's 'setf'
> function, which is a sort of generic setter. So, mutable objects like
> strings, arrays, hashes, etc., could all support a 'value=' or
> 'replace' method which would make them destructively update their
> value.

     I played around with adding a method Module#become(other) (IIRC)
that would cause an object to replace itself with another; the intended
use was a distribution/persistence layer that could invisibly swap
objects out and replace them with stubs that would then bring back the
original object on access.

     Again, if I recall correctly, I got it to the sort-of-working
stage, but bogged down in dealing with the details of some of the
built-in classes, singletons, etc.

 -- MarkusQ