Objectives

This section deals with the meta-level aspects of object-oriented languages such as C++ and Smalltalk. It introduces an elegant solution to the limitations imposed by the metaclass structure of Smalltalk.

Points to emphasize

Hints

The notion of metaclass appears to be quite hard to explain to students not familiar with Smalltalk. A good starting point is the notion of class-wide resources, shared by all instances of a class. Also, you must stress that only an object has the capability to answer messages. Therefore, a class must be an object in order to be able to respond to requests for new instances.

Questions

  1. How would you characterize the concept of a class?
  2. Can you sketch the meta architecture of Smalltalk?
  3. How would you phrase the postulates underlying class-based languages? Can you give a reflective version of these postulates?

Comments

The contribution of the reflective architecture presented in this section is primarily that it avoids an arbitrary limit to the number of meta-levels. You may comment on whether you think meta levels are useful in programming.