From: Bruno H. <br...@cl...> - 2004-01-08 18:02:11
|
Sam wrote: > why signal an error on NO-PRIMARY-METHOD? Because if there is no primary method, the program cannot be executed according to CLHS. CLHS section 7.6.6.2 merely says "The most specific primary method is called." If there is no primary method but there are some before/after/around methods, then the behaviour is unspecified. It's a programming error. > why not do nothing for primary and just call secondary? Do you want an environment that helps the programmer by signalling programming errors, or not? You could also say, "if too few arguments are passed to a function, just pass NIL for the remaining ones". It was like this in some early Lisp implementations. And it was a pain to program. Bruno PS: I just see, again in CLHS 7.6.6.2: "In standard method combination, if there is an applicable method but no applicable primary method, an error is signaled. |