
The Miracle of Smalltalk's become: - blasdel
http://gbracha.blogspot.com/2009/07/miracle-of-become.html
======
mahmud
A more civiled, less procedural version of CL's change-class + update-
instance-for-redifined-class.

~~~
s-phi-nl
I was wondering what the lisp version (if any) of become: would be. Thanks for
saying it.

------
didroe
A good compromise would be if you could specify an object as being
"replacable" and then it would have the extra layer of indirection (the table)
to make it fast. That way you don't pay a penalty when you're not using that
feature and/or don't have to walk the heap. It would also be better for
security in that you'd have to explicitly state which objects were allowed to
be replaced. You have to think about needing that feature in advance though.

~~~
avibryant
I believe Squeak just adds the extra indirection when #become: is used, by
turning the old objects into "forwarders". On the next full GC, the forwarders
get cleaned up and the extra indirection removed.

------
noss
I always wondered what this was able to do and how it worked technically. It's
one of those things I put in a SEP-field and never thought about again.

It reminds me about an Objective-C feature I also never fully understood. I
believe it was "-poseAs:".

