Previous: Application Hooks, Up: Procedures


12.6 Generic Dispatch

MIT/GNU Scheme provides a generic dispatch mechanism that can choose an action to take based on the types of a set of objects. Performance is guaranteed by the use of a hash-based method cache.

This is not an object-oriented programming system, although it can provide the basis for such systems. The difference is that the generic dispatch doesn't have any model for the relationship between object types. Instead, there is a flat space of types and methods are selected by procedural examination of the given operand types.