[Newbies] delegation vs inheritance
eoca at afip.gov.ar
Mon Aug 6 13:38:37 UTC 2007
You can see an example of delegation when is send 'super foo' within a
method foo on A.
Then whoever is super, it will fullfill message foo with its implementation
on behalf of A.
So every time self is found, A will receive the message.
> -----Mensaje original-----
> De: beginners-bounces at lists.squeakfoundation.org
> [mailto:beginners-bounces at lists.squeakfoundation.org]En nombre de
> Michael Haupt
> Enviado el: Sábado, 04 de Agosto de 2007 14:48
> Para: A friendly place to get answers to even the most basic questions
> Asunto: Re: [Newbies] delegation vs inheritance
> Hi Darren,
> On 8/4/07, gruntfuttuck <gruntfuttuck at gmail.com> wrote:
> > Thanks for the reply. I find it very interesting what you say but am
> > struggling to understand it and the info in the link.
> it's something that may be difficult to grasp indeed. Maybe it's my
> explanations that get it wrong. I'll try again, please bear with me.
> In some very few words: if, during the execution of a message that
> made it from A to B somehow, "self" remains bound to A, it's
> delegation. If "self" changes to B, it's forwarding.
> Some other words: if B acts "on behalf of" A (but the credits go to A
> in the end), it's delegation. If B acts because A tells it to and B
> gets the credit, it's forwarding.
> ("On behalf of" meaning "in the name of" above.)
> I *should* come up with an actual example, I know. :-) But the page I
> pointed you to actually does a good job already. (BTW I noticed they
> call "forwarding" "consultation"... well... names...)
> > I think what I need to do is explore this in the morning when
> my brain is fresh.
> That's always a good idea... :-)
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
More information about the Beginners