Logan Capaldo
7/7/2006 2:47:00 PM
On Jul 7, 2006, at 10:23 AM, Yukihiro Matsumoto wrote:
> Hi,
>
> In message "Re: About 1.9 #__method__ feature."
> on Fri, 7 Jul 2006 22:49:11 +0900, dblack@wobblini.net writes:
>
> |> "send" and "funcall" are both taken from lisp function names;
> "send"
> |> invokes a method; "funcall" invokes a function. In Ruby, "send"
> |> invokes a method; "funcall" invokes a method in functional style.
> |
> |Then it's not really taken from Lisp :-)
>
> OK, it's inspired by Lisp functions.
>
> |I'm probably going in circles, but I'm not seeing a functional-style
> |method call here:
> |
> | obj.funcall(:meth)
> |
> |funcall itself isn't being called functionally, and meth isn't being
> |called at all -- that is, you don't see this in the program:
> |
> | meth
> |
> |and therefore it's impossible, I think, to talk about the "style" of
> |the "method invocation".
>
> Hmm, I think I understand your point. Let me think about it.
>
> |If I'm not convincing you, maybe I can suggest:
> |
> | invoke_method_functionally
>
> I agree this is better than invoke_functional_method. I am still
> looking for the better name.
>
> |instead of invoke_functional_method. I honestly don't think
> either of
> |them is perfect, but it would be probably be better not to introduce
> |the separate notion of a "functional method", since the *same* method
> |can be invoked in different ways.
>
> Point taken (about invoke_method_functionally).
>
> matz.
>
Steal another name from lisp?
obj.apply(:meth, 1, 2, 3)
It's not send, but it's not funcall either.
obj apply your :meth function to the arguments 1,2,3
Just throwing stuff out there, feel free to ignore me :)