Chapter 5

Types and Classes


The Dylan type system is used to categorize all objects. In concert with generic functions, types determine the behavior of objects. When an object is passed as an argument to a generic function, the generic function looks at the type of the object to determine which method should be run.

Dylan supports several kinds of types, including classes, singletons, union types, and limited types.

All types are first class objects, and are general instances of <type>. Implementations may add additional kinds of types. The language does not define any way for programmers to define new subclasses of <type>.