Sometimes I find it useful to combine &rest and &key arguments in a
lambda list, especially if I want the key arguments to show up in the
editor hints, have defaults, etc, but I plan to pass them to another
function. For example, (ignore what mosaic is, it is not relevant)
(defun make-mosaic-vector (mosaic &rest make-array-arguments
&key (element-type t) initial-element
initial-contents)
(make-mosaic-vector% :mosaic mosaic
:elements (apply #'make-array (mosaic-size mosaic)
make-array-arguments)))
But unless I
(declare (ignore element-type initial-element initial-contents))
SBCL gives me a style-warning about these variables. I am not
reporting this as a bug because I am not sure what the correct
behavior is (and I could not find anything about this in the HS), but
my intuition is that those variables are used, in the form of
make-array-arguments. Am I wrong, or is this a (minor) bug?
Best,
Tamas
|