Hi --

On Fri, 7 Jul 2006, Yukihiro Matsumoto wrote:

> Hi,
>
> In message "Re: About 1.9 #__method__ feature."
>    on Wed, 5 Jul 2006 20:00:08 +0900, dblack / wobblini.net writes:
>
> |Until people start saying, "Wait -- I thought these things were called
> |'methods' in Ruby.  What's a 'function'?  Is it a method?  Is it just
> |a method without an explicit receiver?
>
> But we already have module_function, which has never been complained
> for more than 10 years.  I think it's OK to meet small confusion for
> the first timers, if we can use the name with right mnemonic for the
> functionality.  Probably the reason behind the funcall is my Lisp
> background.

I'm not a first timer though, and I find it confusing :-)  You're
right about module_function, but it also (in my experience) doesn't
get used much.

The functionality we're talking about, as I understand it, is: send a
message to an object, with the stipulation that the object treat the
message indifferently with respect to the access level of the method
(if any) that corresponds to the message.

To me, that leads to things like send! or absolute_send or inner_send
or instance_send (which I think Sean O'Halpin just suggested).  It's
still basically a "send" operation.

The part I don't understand is why the inclusion of private methods
suddenly makes it something other than a "send" -- why it requires a
(basically) new concept, the concept of objects having "functions" and
responding directly to "call" requests.


David

-- 
  "To fully realize the potential of Rails, it's crucial that you take
    the time to fully understand Ruby--and with "Ruby for Rails" David
       has provided just what you need to help you achieve that goal."
       -- DAVID HEINEMEIER HANSSON, in the foreword to RUBY FOR RAILS.
  Complete foreword & sample chapters at http://www.manning.com/black!