On Mon, Nov 20, 2006 at 10:34:20AM +0000, Christophe Rhodes wrote:
> Juho Snellman <jsnell@...> writes:
> > Add a REPLACE restart for the annoying "FOO already names an ordinary
> > function or a macro" error for DEFGENERIC.
> Although that may be formally allowed (CLHS 22.214.171.124.1 doesn't
> expressly forbid it), I think it's not an optimal name, being as it is
> in the CL package. Could it be called SUPERSEDE instead, or something
> like it?
That sounds like a reasonable point. And I nominate REDEFINE or
OVERWRITE, because SUPERSEDE is one of the words that I have
particular difficulty spelling.:-) Or perhaps just CONTINUE, if CERROR
is allowed by the spec here (?); in context it might be pretty clear
what to "continue" means.
I am not in general a big fan of restarts, but offering a continuation
option for CL-is-too-scared-to-redefine errors (like this, and like
some package errors) seems fairly appropriate.
(In my own coding I sometimes use FROB-DAMMIT to name operations which
FROB the way I mean despite the system's ingrained prejudices, like
(DEFUN APPLY-DAMMIT (FUN &REST REST)
(APPLY FUN ... #|miracle occurs to coerce (LAST REST) to LIST|#))
But DAMMIT might not be the best restart name.)