Classes as Objects

Some languages, in particular Smalltalk and to some extent Java, take the view that a class is simply an object. But every object has responsibilities. If a class is an object, what is its behavior?

A class as an object must maintain information about instances of the class, for example the size of an instance, or perhaps the methods that an instance uses to respond to messages.

A class object must know how to generate new instances of the class, and how to initialize those instances. This is the major responsibility of the class object.

But if a class is an object, and every object is an instance of some class, then what is the class of a class?

[audio] [real] Text to accompany slide6, in Chapter 20 of An Introduction to Object-Oriented Programming