Opening the book…
The final question to be answered is: what is the class of Metaclass class? The answer is simple: it is a metaclass, so it must be an instance of Metaclass, just like all the other metaclasses in the system (see Figure \(\PageIndex{1}\)).
Figure \(\PageIndex{1}\) shows how all metaclasses are instances of Metaclass, including the metaclass of Metaclass itself. If you compare Figures 15.6.1 and \(\PageIndex{1}\) you will see how the metaclass hierarchy perfectly mirrors the class hierarchy, all the way up to Object class.
The following examples show us how we can query the class hierarchy to demonstrate that Figure \(\PageIndex{1}\) is correct. (Actually, you will see that we told a white lie — Object class superclass \(\Rightarrow\) ProtoObject class, not Class. In Pharo, we must go one superclass higher to reach Class.)
Collection superclass >>> Object
Collection class superclass >>> Object class Object class superclass superclass >>> Class "NB: skip ProtoObject class" Class superclass >>> ClassDescription ClassDescription superclass >>> Behavior Behavior superclass >>> Object
Collection class class >>> Metaclass Object class class >>> Metaclass Behavior class class >>> Metaclass
Metaclass class class >>> Metaclass Metaclass superclass >>> ClassDescription
This page titled 15.7: The Metaclass of Metaclass Is an Instance of Metaclass was last modified on Sat, 19 Dec 2020 08:13:47 GMT and is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by via source content that was edited to the style and standards of the LibreTexts platform.
The book could not be loaded just now.