On Wed, Jul 25, 2001 at 12:37:33AM +0900, Matthias Lampert wrote:
> Hi, Chris!
> 
> Also las ich bei Chris Moline [mailto:ugly-daemon / home.com]
> > 
> > [...]
> > 
> > May I ask what metaclasses are?? Are they classes for 
> > instatiating classes??
> > 
> 
> So to say, indeed.  In a way, in Ruby every class needs two parents
> to be born:
> 
>       <> The regular class it inherits from (Object, if there's no
>          other superclass given)         and
>       <> its metaclass.  Here all is found that applies to all children
>          of this magna mater: class-wide variables, class methods etc.
> 
> Same is true in Smalltalk, by the way, and I think, in every interpreted
> OO language. (C++ and Java are compiled -- that's why they need static
> things to provide something like the same features as the metaclass.)
So a metaclass is a class about a class. If ruby didn't have class variables I
would use an ordinary object that maintained the info that I would otherwise put
into class variables. Is this analogous to what metaclasses are for??