From: Rick DeNatale Date: 2007-10-03T23:44:09+09:00 Subject: Re: Reference vs. Reference On 10/3/07, Robert Dober wrote: > On 10/3/07, Rick DeNatale wrote: > > > > > One of the things which the early Smalltalk memory management design > > did was to enable the become method. In Smalltalk one could say: > > > > object1 become: object2 > > > Squeak still does support this. > When used with care it can be a wonderful tool, especially in metaprogramming. Yep, it looks like Squeak has both ProtoObject#become: which has the old swap semantics, and Object#becomeForward: which is one-way. A quick look at the senders of #become: in the standard 3.9 image seems to indicate that none of them actually use the swap they are all becoming a newly created and otherwise unreferenced object, which won't be referenced when the method returns. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/