Robert Klemme wrote:
> On 19.01.2007 19:33, Yukihiro Matsumoto wrote:
> > Wolfgang's proposal can be divided into three methods.
> >
> >   #receiver that returns the bound object of the method object.
> >   #name that returns the name of the method object.
> >   and a method that returns the class which holds the method.
> >
> > Does anybody have good name candidate for the last one?  I have
> > already implemented the first two methods in the local copy of the
> > repository.
>
> I opt for "defining_class", because this precisely states what it
> returns.  Some might find it a bit much of typing but I think we have
> much worse cases in Ruby (attr_accessor for example, which is much more
> often used).  If someone can come up with an equally clear name which is
> shorter, that's fine with me.

I have two objections to this:
1) The fact that there are some methods which are a pain to type does
not mean that we should feel OK about making all methods a pain to
type. Certainly, verbose naming matters less of the method would be
infrequently used (as this one would). But we should continually strive
for a balance between clarity and terseness (and I see that you
implicitly agree with that, given your last sentence).

2) If a method is rebound to a new object, what is desired (I think) is
the current 'parent' class of the method, not the one where it was
defined. If derivatives of the word 'defined' are in the method name,
this (edge) case will be confusing.

If we're going verbose, I prefer #owning_class. Striving for terseness,
however, I prefer #owner. To me, that's pretty clear.