On Tue, 21 Mar 2006 dblack / wobblini.net wrote:

> Hi --
>
> On Tue, 21 Mar 2006, eastcoastcoder / gmail.com wrote:
>
>> BTW, There's an RCP asking for this.
>> 
>> I know that a lot of people would really like this (myself included).
>> Has anyone voiced any serious reasons why *not* to make this the
>> default behavior?
>
> I guess that means you don't think the reasons given in the comment
> section of the RCR are serious :-)
>
> I don't think it's a good idea, because I see no reason to favor the
> hypothesis that a module's singleton methods are appropriate for a
> class, just because the module's instance methods are appropriate for
> instances of the class.  That's one possible scenario (and it can
> easily be done, already, though I think it's not necessarily a sign of
> optimal design), but I don't see why it should be the starting point
> and everything else a deviation from it.  See the RCR site for more
> comments from me and others.

indeed:

   class B
   end

   module M
     def M.new() B.new end
   end

   class C
     include M
   end

not least of which.

-a
-- 
share your knowledge.  it's a way to achieve immortality.
- h.h. the 14th dali lama