Hi --

On Sun, 31 Dec 2006, Daniel Schierbeck wrote:

> I agree that `funcall' is a weird name... "call a function". What
> function? I thought we agreed on calling them methods!

I think the idea is that calling methods without a receiver can be
considered "functional style"; therefore, "funcall", rather than
"send", should be understood to include private methods.

I'm not sure I find it very convincing.  I think of the no-receiver
thing as a way of un-cluttering the code a bit, not a departure from
object orientation.  After all, there *is* a receiver, and it is
receiving a message.

Also, funcall itself does involve a receiver.  So the situation is
that you see this:

   obj.funcall(:meth)

and you infer that it includes private methods because *if* you were
calling meth as a private method, there would be no receiver.  To me
that involves too much "What if?"


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)