Contradiction between the MOP and the standard ?

Didier Verna didier at lrde.epita.fr
Wed Jan 17 16:53:27 UTC 2018


  Hi,

In the CLHS page for ENSURE-GENERIC-FUNCTION, there is this paragraph:

"If function-name specifies a generic function that has a different
value for the :generic-function-class argument and if the new generic
function class is compatible[1] with the old, change-class is called to
change the class of the generic function; otherwise an error is
signaled."


In the AMOP however, one can read the following.

>From the page on ENSURE-GENERIC-FUNCTION:
"The behavior of this function is actually implemented by the generic
function ensure-generic-function-using-class. When
ensure-generic-function is called, it immediately calls
ensure-generic-function-using-class and returns that result as its own."

And then from the page on ENSURE-GENERIC-FUNCTION-USING-CLASS:
"If the class of the generic-function-or-nil argument is not the same as
the class specified by the :generic-function-class argument, an error is
signaled."


Let alone the fact that this should only apply when there actually is an
existing generic function, this seems to be in contradiction with the
Common Lisp standard, as it would explicitly forbid changing the class
of the generic function, even in a "compatible" way.


Comments?


Footnotes: 
[1]  BTW, what does "compatible" mean ?

-- 
Resistance is futile. You will be jazzimilated.

Lisp, Jazz, Aïkido: http://www.didierverna.info



More information about the pro mailing list