On Thu, 23 Feb 2006 dblack / wobblini.net wrote:

> I'm still not happy about #funcall.  How is one supposed to remember
> which (#send or #funcall) is which?  There are a few things in Ruby
> where "you just have to memorize it" -- like the true/false arguments to
> #instance_methods, or the differences between Proc.new and lambda. I've
> always felt that these are soft spots in the language. #send/#funcall
> seems to me to be in the same category.

me too. i downvote #funcall. besides, is there a #__funcall__ too?

in the C API, there is rb_funcall() which is used all over the place, but 
i don't think that the name is great, especially as it conflicts with all 
the existing Ruby (non-C) terminology. What I mean is: the name #funcall 
only makes sense to extension writers.

> Also, are methods now also called functions?  That would be a pretty
> huge change in terminology.
> #funcall just doesn't seem like a good fit.

let's call it #funnycall instead.

Besides, i don't think that there's a point in having private/protected in
Ruby. It's the feature I least care about. Especially because:

class A
private
  def x() p"hello from A" end
public
  def y() x end
end
class B<A
private
  def x() p"hello from B" end
end

B.new.y #=> "hello from B"

so it's really not as if #x doesn't exist from the perspective of B.

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tñÍ:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, MontrñÂl QC Canada