Dispatch on Multiple Arguments
(defmethod draw ((shape rectangle) (stream postscript-stream)) . . .)
(defmethod draw ((shape rectangle) (stream window-stream)) . . .)
(defmethod draw ((shape circle) (stream postscript-stream)) . . .)
(defmethod draw ((shape circle) (stream window-stream)) . . .)
Because of multiple dispatch, methods do not "belong" to classes
- They "belong" to a combination of one or more classes
- Differs from message-passing systems where a class implements certain messages
-
Methods are associated with the generic functions