A few days back I wrote this:
The metaclass’ superclass is set to the
metaclass of the classes superclass.
Since I first wrote it I’ve gotten some feedback that the last sentence is a little hard to digest, so I’ve added an example.
Let’s say we create a class MyNiftyClass as a subclass of Object. The singleton class of the class object referenced by the MyNiftyClass global gets created at the same time as class object, no waiting for one of the things which trigger the creation of a singleton class for a non-class object. Thesuperclass of the MyNiftyClass is set to object, and the superclass of MyNiftyClass’ metaclass is set to Object’s metaclass.
Besides the fact that their creation occurs immediately, there is one other difference between
singleton classes of objects and singleton classes used as
metaclasses. The later can have subclasses, while the former cannot.
I’ve gone back and editted <a href]“http://talklikeaduck.denhaven2.com/articles/2007/06/02/chain-chain-chain”>the original post, but I’ve summarized it here in case anyone else has actually already read it.





Nice clarification - thanks!