3.2 Classes
We have already seen examples of classes in Dylan: <integer>, <single-float>, <string>, and <object>.
Individual values are called objects. Each object is a direct instance of one particular class. You can use the object-class function to determine the direct class of an object. For example, in certain implementations, 7, 12, and 1000 are direct instances of the class <integer>:
? object-class(1000); {class <integer>}
The value returned by object-class is the <integer> class itself. The appearance of a class, method, or generic function in a listener depends on the Dylan environment. We have chosen a simple appearance of classes for this book.
All the classes that we have seen so far are built-in classes, provided by Dylan. In Chapter 4, User-Defined Classes and Methods, we show how to define new classes.




