On 7/26/05, Daniel Brockman <daniel / brockman.se> wrote:
> Joe Van Dyk <joevandyk / gmail.com> writes:
> > I thought that the methods and constants in a module were
> > just inserted into a class.
> 
> Daniel Brockman <daniel / brockman.se> writes:
> > Yet another reason why modules and classes should
> > be unified.
> 
> Austin Ziegler <halostatue / gmail.com> writes:
> > I don't see it, personally.  I really don't see why they
> > should be unified in the least.
> 
> Twelve hours ago,
> Jim Freeze <jim / freeze.org> writes:
> > For some reason I always thought that including a mod
> > would shadow old methods.
> 
> Dear Austin,
> 
> While the superficial and cosmetic difference between these
> two almost completely equivalent concepts continue to
> mislead users, do you still not see "in the least" any
> reason whatsoever to unify them?

Nope. I'll note that others have argued better in favour of this than
you have and they're still not unified. I think that unification would
increase the confusion far MORE than what is currently present.

> Oh, and before someone comes shouting "but classes can be
> instantiated and modules can't," let me just post this:
> 
>    class Module
>      def new(*a, &b)
>        const_defined?(:Viagra) or
>          const_set(:Viagra, Class.new.include(self))
>        const_get(:Viagra).new(*a, &b)
>      end
>    end

That's not instantiating a module. It's cute, but it's not
instantiating a module.

-austin
-- 
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca