Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. 6.3.3 The Class Metaclass
  2.  
  3. As objects, metaclasses are also instances of a class, and that class is
  4. also a metaclass since the metaclasses are class objects. However,
  5. unlike classes, all metaclasses share the same protocol, namely the
  6. message that creates their single instance. Therefore, the metaclass
  7. objects are all instances of the same class, namely the system class
  8. Metaclass. For any class C, the expression C class class returns
  9. Metaclass. Metaclass defines a single instance variable, thisClass,
  10. which refers to the metaclass's instance.
  11.  
  12. Now consider Metaclass class, which is the metaclass of Metaclass. Every
  13. metaclass is an instance of Metaclass, so Metaclass class is an instance
  14. as well. Because Metaclass is the instance of Metaclass class, this is
  15. the point of circularity in the system with respect to class (i.e.,
  16. "instance of") references. The class/instance relationships among
  17. objects, classes, metaclasses, Metaclass and Metaclass class, are
  18. illustrated in Figure 6.6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement