--- wscl.orig 2024-03-02 04:37:17.552513989 -0500 +++ wscl.new 2024-03-02 05:14:54.810316338 -0500 @@ -28,22 +28,23 @@ inadvertently modifying an existing generic function. It seems likely that the intention was to allow for semantically - valid default values of keyword parameters that are not supplied, + valid default values of keyword arguments that are not supplied, which is what this issue report suggests. - Furthermore, for the keyword argument :generic-function-class the - description, uses a term "compatible", to refer to the relation - between the class of an existing generic function, and the class - supplied by this argument. However, the concept of compatibility is - nowhere defined. This issue report suggests eliminating the term - and require that the old and the new class be the same. + Furthermore, for the keyword parameter :generic-function-class, the + description uses the term "compatible" to refer to the relation + between the class of an existing generic function and the class + supplied by the corresponding argument. However, the concept of + compatibility is nowhere defined. This issue report suggests + eliminating the term and requiring that the old and the new class + be the same. Proposal (ENSURE-GENERIC-FUNCTION-REASONABLE-DEFAULTS): We suggest modifying the Description part of the dictionary entry for ENSURE-GENERIC-FUNCTION as follows: - The function ensure-generic-function is used to define a globally + The function ENSURE-GENERIC-FUNCTION is used to define a globally named generic function with no methods or to specify or modify options and declarations that pertain to a globally named generic function as a whole. @@ -75,9 +76,9 @@ :argument-precedence-order defaults to the list of required parameters in the :lambda-list argument, in the order they appear. If the argument :argument-precedence-order was - supplied, but it is not a proper list containing a permutation - of the required parameters in the argument :lambda-list, an - error is signaled. + supplied, but its value is not a proper list containing a + permutation of the required parameters in the argument + :lambda-list, an error is signaled. If the argument :method-combination was not supplied, it defaults to the standard method combination. @@ -94,25 +95,23 @@ If function-name specifies an existing generic function: If the argument :generic-function-class was not supplied, or if - the value of the argument is the same as the class of the - existing generic function, then the class of the existing - generic function is not modified. If the argument - :generic-function-class was supplied, and is different from the - class of the existing generic function, then an error is - signaled. + its value is the same as the class of the existing generic + function, then the class of the existing generic function is not + modified. If the argument :generic-function-class was supplied + and is different from the class of the existing generic function, + then an error is signaled. - If the argument :method-class was not supplied, or if the value - of the argument is the same as the method-class of the existing - generic function, then the method-class of the existing generic - function is not modified. If the argument :method-class was - supplied and is different from the method-class of the existing - generic function, then the method-class of the existing generic - function is modified, but existing methods are not removed or - modified. + If the argument :method-class was not supplied, or if its value + is the same as the method-class of the existing generic function, + then the method-class of the existing generic function is not + modified. If the argument :method-class was supplied and its + value is different from the method-class of the existing generic + function, then the method-class of the existing generic function + is modified, but existing methods are not removed or modified. If the argument :lambda-list was not supplied, the lambda list of the existing generic function is not modified. If the - argument :lambda-list was supplied, and the value is congruent + argument :lambda-list was supplied, and its value is congruent with the lambda lists of every existing method (which is trivially true if there are no existing methods), then the lambda list of the existing generic function is modified @@ -129,16 +128,16 @@ supplied, but the lambda list of the existing generic function has not been initialized, an error is signaled. If the argument :argument-precedence-order was supplied, the argument - :lambda-list was not supplied, and the value of this argument is + :lambda-list was not supplied, and the value of the former is not a proper list containing a permutation of the required parameters of the lambda list of the existing generic function, then an error is signaled. If the argument :argument-precedence-order was supplied, the argument - :lambda-list was supplied, and the value of this argument is not + :lambda-list was supplied, and the value of the former is not a proper list containing a permutation of the required - parameters of the value of the argument :lambda-list, then an - error is signaled. Otherwise the argument precedence order of - the existing generic function is modified accordingly. + parameters of the value of the latter, then an error is + signaled. Otherwise the argument precedence order of the + existing generic function is modified accordingly. If the arguemnt :method-combination was not supplied, then the method combination of the existing generic function is not @@ -146,26 +145,27 @@ then the method combination of the existing generic function is modified accordingly. - If the argument :documentation was not given, then the + If the argument :documentation was not supplied, then the documentation of the existing generic function is not modified. - If the argument :documentation was given, the documentation of - the existing generic function is modified accordingly. + If the argument :documentation was supplied, the documentation + of the existing generic function is modified accordingly. - If the argument :declare was not given, then the declarations + If the argument :declare was not supplied, then the declarations associated with the existing generic function are not modified. - If the argument :declare was given, the declarations associated - with the existing generic function is modified accordingly. + If the argument :declare was supplied, the declarations + associated with the existing generic function are modified + accordingly. We suggest modifying the Exceptional Situations part of the dictionary entry for ENSURE-GENERIC-FUNCTION as follows: If function-name is a symbol and (fdefintion function-name) returns an ordinary function, a macro, or a special operator, then - an error of type type-error is signaled. + an error of type TYPE-ERROR is signaled. - If the argument :lambda-list was supplied, but it is it not a + If the argument :lambda-list was supplied, but it is not a valid generic-function lambda list, then an error of type - type-error is signaled. + TYPE-ERROR is signaled. If function-name is the name of an existing generic function, the argument :lambda-list was supplied, the argument @@ -174,10 +174,11 @@ permutation of the required parameters in the value of the argument :lambda-list, then an error is signaled. - If function-name is the name of an existing generic function, if - the argument :lambda-list was supplied, and the existing generic + If function-name is the name of an existing generic function, the + argument :lambda-list was supplied, and the existing generic function has a method with a lambda list that is not congruent - with the argument, then an error of type type-error is signaled. + with the value of the argument, then an error of type TYPE-ERROR + is signaled. If function-name is not the name of an existing generic function, the argument :argument-precedence-order was supplied, but the @@ -188,32 +189,33 @@ the argument :argument-precedence-order was supplied, the argument :lambda-list was supplied, but the value of the argument :argument-precedence-order is not a proper list containing a - permutation of the required parameters in the value of the augment - :lambda-list then an error is signaled. + permutation of the required parameters in the value of the argument + :lambda-list, then an error is signaled. - If the argument :generic-function-class was supplied and it is not - a subclass of the class GENERIC-FUNCTION, nor the name of such a - subclass, then an error of type type-error is signaled. + If the argument :generic-function-class was supplied and its value + is not a subclass of the class GENERIC-FUNCTION, nor the name of + such a subclass, then an error of type TYPE-ERROR is signaled. - If function-name is the name of an existing generic function, if - the argument :generic-function-class was supplied, and the value + If function-name is the name of an existing generic function, the + argument :generic-function-class was supplied, and the value supplied is not the same as the class of the existing generic - function, then an error of type type-error is signaled. + function, then an error of type TYPE-ERROR is signaled. - If the argument :method-class was supplied and it is not a + If the argument :method-class was supplied and its value is not a subclass of the class METHOD, nor the name of such a subclass, - then an error of type type-error is signaled. + then an error of type TYPE-ERROR is signaled. - If the argument :method-combination is supplied, but it is not a - subclass of the class METHOD-COMBINATION, then an error of type - type-error is signaled. + If the argument :method-combination is supplied, but its value is + not a subclass of the class METHOD-COMBINATION, then an error of + type TYPE-ERROR is signaled. - If the argument :documentation is supplied, and it is neither a - string nor NIL, then an error of type type-error is signaled. + If the argument :documentation is supplied, and its value is + neither a string nor NIL, then an error of type TYPE-ERROR is + signaled. - If the argument :declare is supplied, and it is neither a + If the argument :declare is supplied, and its value is neither a declaration specifier containing only OPTIMIZE declaration - specifiers nor NIL, then an error of type type-error is signaled. + specifiers nor NIL, then an error of type TYPE-ERROR is signaled. Rationale: @@ -221,7 +223,7 @@ cumbersome, as it requires the caller to determine whether an existing generic function with the given name exists, and if so access the parameters of that generic function in order to avoid - inadvertently modifying any of those parameter. + inadvertently modifying any of those parameters. Current practice: @@ -237,15 +239,15 @@ To use this function in conforming code, application programmers must determine whether an existing function with the given name - exists, and access the parameters of that function, and supply the - values of those parameters that should not change as arguments to + exists, access the parameters of that function, and supply the + values of the parameters that should not change as arguments to this function. Benefits: Application programmers may rely on reasonable default behavior - whether the name given is the name of an existing generic function - or not. + whether the name supplied is the name of an existing generic + function or not. Aesthetics: