Closed phoe closed 8 years ago
Uh. It falls back to Swank for every implementation if Swank is present. CCL is no different there.
As for non-standard lambda-list keywords, I feel like instead of your proposed solution there should be a function to normalise a lambda list, which potentially replaces or removes keywords that are non-standard. However, in order for that to work, a survey over all implementations would have to be made to figure out what extensions they provide and how they work. I don't have time for that.
Your proposition sounds sane - a compatibility library for normalizing lambda-lists that can use TRIVIAL-ARGUMENTS and/or SWANK as its backend. I think I might begin work on one as I able to query SBCL, CCL and ECL - and because I'll be developing on/for these implementations.
I wouldn't mind having that one function in here. Another library entirely just for that seems a bit much.
I guess that TRIVIAL-ARGUMENTS wouldn't be too TRIVIAL anymore if I added such a function to it - but then again, I don't mind.
TRIVIAL-ARGUMENTS
falls back to Swankarglist
implementation on Clozure Common Lisp. On CCL, some functions (as simple as#'+
) have&LEXPR
in their lambda lists, which is not a standard keyword.It is compatible with
&REST
, as seen in https://github.com/fukamachi/clozure-cl/blob/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/lib/arglist.lisp#L259My suggestion is - allow a
:STANDARD-COMPLIANT-P
keyword to be passed to#'TRIVIAL-ARGUMENTS:ARGLIST
that will search for all&LEXPR
instances on the arglist and replace them with&REST
. This can be possibly expanded with other non-standard lambda list keywords.Tell me what you think about it - if you think it's worth the shot, I can submit a patch.