Hi --

On Sun, 21 Jan 2007, gwtmp01 / mac.com wrote:

>
> On Jan 20, 2007, at 2:28 PM, dblack / wobblini.net wrote:
>> Right, but I don't see that relationship as the same as what we
>> usually call "receiver", which is part of the dynamic process of an
>> object actually receiving a certain message.
>
> Yes, but there are two different messages being sent to two different
> receivers.  It is similar to a proxy pattern. The proxied object
> is still a receiver of a message (from the proxy object).
>
> m = -1.method('abs')
> m.call
>
> m is the receiver of 'call'
> 'call' is the name of the method sent to m
>
> -1 is the receiver of 'abs'
> 'abs' is the name of the method sent to -1
>
> m.name	   # 'abs'
> m.receiver # -1
> m.origin   # Fixnum
>
> Perhaps bound_name and bound_receiver makes the relationship clearer? I would 
> still prefer the shorter names as it doesn't seem anomalous to
> me or at least no more anomalous than any other 'proxy' pattern.

My problem with using "receiver" this way is that it's detached from
the process of receiving a message.  It's really the object that
*would* be, or will be, or could be the receiver.

I just foresee lots of need to clarify what one means when one says
"the receiver".  I do think that something indicating "bindee",
essentially, would make more sense, since what's being reported is
really the fact that the method is bound to this object -- which can
vary independently of the question of whether the object ever actually
receives the message.


David

-- 
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
    (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)