[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defgeneric :method option

A small detail.  Since we remove the methods that were defined by
:method in a DEFGENERIC, it would be consistent to allow the change of
the lambda-list if the only methods defined for this generic function
are the one defined by :method. Logically, we are in the case
where there is no method on the updated generic function.
If we agree on this, it means that the remark part of defgeneric must
be updated, and the following form cannot be the expansion of

       (ensure-generic-function 'name :blah blah blah)
       (let ((methods (list (defmethod name blah blah blah)
     		       (defmethod name blah blah blah)
     	(generic (symbol-function 'name)))
         (dolist (method (generic-function-locally-defined-methods generic))
           (remove-method generic method))
         (setf (generic-function-locally-defined-methods generic) methods)