Looking back... (was Re: [Newbies] How to empty a collection?)
Michael van der Gulik
mikevdg at gmail.com
Tue Feb 19 20:47:28 UTC 2008
On Feb 20, 2008 8:47 AM, <johnps11 at bigpond.com> wrote:
> Hi Goran!
> I just want to point out that the long links in your mail were broken for
> me (although a little cut and paste fixed that). Perhaps a service like
> tinyURL would be useful when sending long links from the dark and distant
> I have noticed in this thread an undertone of "#become is the Devil's
> Could someone succinctly explain to someone who is a coarse and styless
> programmer like myself why this is so, and when its use is justified?
Hi John the Newbie.
It would be appreciated if you replied under a quoted message rather than
I've just sent an email in the original thread about this.
It's use would only be justified if there are no other options. I've used it
myself in my remote object architecture for converting a
message-capturing object proxy into the original object when an object is
migrated between computers. My intention was to keep the remoteness of the
objects involved as hidden as possible, making the use of #become:
necessary. In retrospect, it was a big and dangerous time-waster. Many
images died to bring me this information.
Originally, the Collections framework in Squeak used become: to grow some
collections. The blue book design of the Smalltalk VM has an object
lookup table where the implementation of #become: was very fast - switch a
single pointer. The Squeak VM uses direct pointers between objects now, so
the entire object memory needs to be scanned.
 http://www.gulik.co.nz/dpon_design.pdf, http://www.squeaksource.com/DPON
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners