[GOODIE] Delegation and Self like things for Squeak

Stephen Pair spair at advantive.com
Tue Aug 21 01:36:31 UTC 2001


Withers, Robert wrote:
>Hi Stephen, 
>I will attempt the full VM build and image preparation this evening and
let you know how my Linux machine likes it.  As you know, I had
difficulty with the Forwarder changeset under Linux.  I am wondering if
it may have been due to my not running the image prep code you list
here.

Possible.  There are other problems with the Forwarder stuff.  Squeak
seems to expect all objects to natively respond to at least the
ProtoObject protocol for some things that it does (like scanning for all
references and such).  As soon as I began to address those issues, I
realized that I could do everything I needed with a more generalized
delegation scheme...so, the delegation stuff supercedes the Forwarder
code (I'll make a note of it on the website).


>It strikes me that this may be an alternative to your proposal for
differentiating multiple versions of the same message.  If we proxy an
object reference, with a delegate, then we can pick up any overriding
implementations of a method for it's class, within that Module.  Instead
on overriding a superclass' implementation, we are overriding a class
implementation in an inner, more generic module, with an implementation
in a more specific module implementation.  In this way, don't extensions
of classes between modules look like Self-style inheritance?

What about identity comparisons?  Seems like that would cause trouble.
How would the compiler be able direct a message to it's special wrapper
instance instead of the real object?  Also, it would add a good bit of
storage overhead.

- Stephen





More information about the Squeak-dev mailing list