[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DEFGENERIC
- To: Dick Gabriel <RPG@SAIL.STANFORD.EDU>
- Subject: DEFGENERIC
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 8 Feb 88 12:13 EST
- Cc: common-lisp-object-system@SAIL.STANFORD.EDU
- In-reply-to: The message of 6 Feb 88 14:46 EST from Dick Gabriel <RPG@SAIL.Stanford.EDU>
Date: 06 Feb 88 1146 PST
From: Dick Gabriel <RPG@SAIL.Stanford.EDU>
The material for the behavior Moon specified does not look too bad
when presented this way: defgeneric does an ensure-generic-function,
it removes all methods defined by any previous defgeneric, and then
it adds the methods specified by the :methods. The DEFCLASS description
is similar. The presentation is clear and more concise than the
desciption of the previous behavior.
I prefer to add new methods before removing old ones, to avoid a transient
state in which methods are missing. Remove-method is specified not to error
if the method is already gone. Defining a method is specified (page 1-27) to
create a new method object and discard any existing method object, rather
than modifying the object as defining a class does. Those two facts mean
it's safe to do the add before the remove.