[Ecls-list] Keyword arguments and compiler macros
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Thu Dec 1 21:13:15 UTC 2011
[Sorry for possible duplicates]
I just realized that compiler macros might be too restrictive in some
implementations. Take for instance
(define-compiler-macro foo (a &key key-arg) ...)
This is assuming that FOO is only going to be invoked with _constant_
keyword arguments. I know, I know, most uses will have always one argument
or :KEY-ARG, but suppose you want to call (FOO some-value
a-non-constant-expression some-other-value)... What is the compiler to do?
I _now_ think that the compiler macro processor should simply recognize the
failure to parse the form and return the original form, unprocessed, but
the implementations I have at hand do not do that. ECL to begin with, but
also CCL and SBCL.
Any opinions on this?
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20111201/2955f5b8/attachment.html>
More information about the ecl-devel
mailing list