-(defclass generic-function (dependent-update-mixin
- definition-source-mixin
- funcallable-standard-object)
- ((documentation
- :initform nil
- :initarg :documentation)
- ;; We need to make a distinction between the methods initially set
- ;; up by :METHOD options to DEFGENERIC and the ones set up later by
- ;; DEFMETHOD, because ANSI specifies that executing DEFGENERIC on
- ;; an already-DEFGENERICed function clears the methods set by the
- ;; previous DEFGENERIC, but not methods set by DEFMETHOD. (Making
- ;; this distinction seems a little kludgy, but it has the positive
- ;; effect of making it so that loading a file a.lisp containing
- ;; DEFGENERIC, then loading a second file b.lisp containing
- ;; DEFMETHOD, then modifying and reloading a.lisp and/or b.lisp
- ;; tends to leave the generic function in a state consistent with
- ;; the most-recently-loaded state of a.lisp and b.lisp.)
- (initial-methods
- :initform ()
- :accessor generic-function-initial-methods))
- (:metaclass funcallable-standard-class))