FUNCTION-TYPE-KEY-NAMEFUNCTION type specifier list is provided to allow declaration of function argument types and return value types. This type specifier uses a syntax similar to the usual lambda list syntax to specify which types go with which lambda list variables. However, there is a problem with &KEY lambda variables because CLtL does not specify how the types specified in the FUNCTION declaration are matched up to either the actual arguments passed to the function, or the lambda variables in the function definition (since the ordering of keyword arguments is arbitrary).KEY parameters in a FUNCTION type specifier lambda list should be supplied as lists of the form (<keyword> <type>). The <keyword> must be a valid keyword-name symbol as must be supplied in the actual arguments of a call. (This is usually a symbol in the keyword package, but, as per KEYWORD-ARGUMENT-NAME-PACKAGE, not necessarily so.)
(2) Allow &ALLOW-OTHER-KEYS to appear in a FUNCTION type specifier lambda list.
The interpretation of such declarations is that, when &KEY is given in a FUNCTION type specifier lambda list, it is safe to assume that the &KEYs given are exhaustive unless &ALLOW-OTHER-KEYS is present.
&ALLOW-OTHER-KEYS is an indication that other keyword arguments may actually be supplied and, if supplied, may be used.
MAKE-LIST could be declared as:
(FUNCTION MAKE-LIST ((INTEGER 0) &KEY (:INITIAL-ELEMENT T)) LIST)
KEY arguments appear in the actual function definition.
(2) This is probably an oversight in the original specification.
FUNCTION type declarations. The situation regarding type specifications for keyword arguments is so ambiguous that few users attempt to use them.FUNCTION type specifier or keyword arguments in a FUNCTION type specifier may continue to do so. This proposal should not involve massive amounts of code to be rewritten.FUNCTION type specifiers and particularly the specification of keyword argument types are not widely used. However, since this is an incompatible change, it would be nice if implementations check for, and warn about, old-style usage.FUNCTION type specifier will continue to be of limited use for its intended purpose.