+ Edi Weitz <[EMAIL PROTECTED]>: | | CL-USER 1 > (destructuring-bind (x . y) nil (list x y)) | | Error: NIL does not match (X . Y). | | Most CL implementation barf here while CMUCL (18e) returns (NIL | NIL). Is this a bug? | [..] | I guess there's | something somewhere in the spec(k) that defines the correct outcome.
The following piece from CLHS 3.4.4.1 seems quite clear to me: If no lambda list keywords appear, then the macro lambda list is a tree containing parameter names at the leaves. The pattern and the macro form must have compatible tree structure; that is, their tree structure must be equivalent, or it must differ only in that some leaves of the pattern match non-atomic objects of the macro form. For information about error detection in this situation, see Section 3.5.1.7 (Destructuring Mismatch). So yes, it's a bug as far as I can tell. See also "tree structure" in the glossary: Since (x . y) contains a cons, so must anything matching it. - Harald
