3 ms·
CLOS only allows dispatch on classes and not types, because there is no hierarchy in types. For example, if you have a method specializing on the type (satisfi
by jorams 11y ago
CLOS only allows dispatch on classes and not types, because there is no hierarchy in types.
For example, if you have a method specializing on the type (satisfies a) and a method specializing on the type (satisfies b), and you call a generic function with an object that satisfies both a and b, which method should be called first?
Or methods specializing on the types (integer 0 8) and (integer 1 9). If the argument is 5, which type is more specific?
Classes are a subset of types with a certain hierarchy, so there is always a "correct" order for methods to be called in.