On Apr 4, 11:01 am, "ara.t.howard" <ara.t.how... / gmail.com> wrote:
> On Apr 4, 2008, at 8:07 AM, Trans wrote:
>
>
>
> > So, assuming we are still ideologically opposed binding-of-caller what
> > do others think of the idea of capitalized methods having the same
> > scope lookup as constants?
>
> it leads to a weird sort of namespace pollution:
>
> class C
>
>    def M
>
>      'quasi-globa-instance-methodl'
>
>    end
>
>    class D
>
>      def foobar
>
>        M()  # this works even though M is not an instance method of D
>
>      end
>
>    end
>
> end

Right it does. But it's not a "pollution" we are unaccustomed to --it
is merely constant lookup. So we can conceive of these as Constant
Methods.

However, you make a point. In having these it would probably require
we enforce that normal methods can not be capitalized. But, as Robert
says, they are rarely used. In fact, I would argue that when they are
used it is probably alwasy to achieve exactly the kind of
functionality this change would support.

T.