Charles Oliver Nutter wrote:
> John Lam (CLR) wrote:
>> Thanks for sharing the eigenclass hack.
>>
>> More interestingly though, is where does the new method comes from 
>> when doing A.new. We believe that once we've looked at all of the 
>> ancestor classes' eigenclasses for new, that we then hit the Class and 
>> Module classes in the list of eigenclasses. Does that make sense as 
>> well? It's a bit strange because you start off looking through the 
>> eigenclass hierarchy for new, and then switch to the class hierarchy 
>> at the very end for Class, Module and Object.
>>
>> Is this how things are actually implemented? (BTW I'm not lazy here - 
>> we cannot look for ourselves).
>>
>> Also, as long as we respect this lookup mechanism, does anyone forsee 
>> any problems in merging the identities of the eigenclass and class 
>> objects into the same object (other folks who have code that 
>> explicitly depends on the behavior of the eigenclass hack -- not sure 
>> what this really means at this time though).
> 
> Don't get confused now...class methods are not defined on the 
> "eigenclass", they're instance methods on the class object. The class 
> object is often also referred to as the object's metaclass, though this 
> terminology can be confusing.

Well, let me alter that a bit...apparently there are a few definitions 
of eigenclass floating around, that are sometimes compatible and 
sometimes incompatible with metaclass. If the code below is expected to 
return the eigenclass, then the "Array metaclass" in my previous mail 
would be the "Array eigenclass"...

class Array
   def eigen
     class << self; self; end
   end
end

So I believe what I've traditionally called "the class's metaclass" is 
now being referred to as "the class's eigenclass".

*sigh*

- Charlie