Coming in late here, but it seems odd to have an actual class called "MetaClass". The meta-object protocols with which I am familiar have the concept of a metaclass (a class whose instances are themselves classes), and the class Class is such a metaclass, but where does a class named MetaClass fit in? If all metaclasses are instances of MetaClass, then MetaClass must be an instance of itself - is this then the only cycle in the graph?
> 1) MetaClass is a subclass of Object > 2) MetaClass is an instance of MetaClass OK. > So the following code should be true (given a random instance $obj). > > $obj.meta.isa(MetaClass); > $obj.meta.isa(Object); What does $obj.meta return - is it just a shortcut for $obj.class.class, or is something else going on here? If the former, then all of these should be true. $obj.isa(Object) $obj.class.isa(Object) $obj.class.isa(Class) $obj.meta.isa(Object) $obj.meta.isa(Class) $obj.meta.isa(MetaClass) > However, Syn/Apoc 12 shows that the following is true if $foo is an > instance of the Foo class. > > $foo.meta.isa(Foo) Hm. That doesn't make sense to me at all. Clearly I need to reread the Syn/Apoc. I'd expect $foo.isa(Foo) and that's it, although if nothing fancy with composition is going on $foo.class == Foo would also be true.