[Next] [Previous] [Up] [Top] [Contents] [Index]

Appendix B: The Common Lisp Object System

Method combination

* Note: This and the following sections provide a very simplified summary of method combination. For full details see Common Lisp: The Language.

How does a function decide which method to use for a particular set of arguments?

There are two categories of methods. The first, the primary method, defines the main action of the effective method that the generic function applies to the instance.

The second category, auxiliary methods, may modify that action in one of three ways. An auxiliary method has the method qualifier :before, :after, or :around. They run before the primary method, after the primary method, or around the primary method and all of its :before and :after methods.

The primary method
The primary method and the class precedence list
Examples of classes with multiple superclasses
Creating auxiliary methods and using method qualifiers

Gettmg Started with MCL - 19 OCT 1996
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with Harlequin WebMaker