[pro] why :key arguments?

Nikodemus Siivola nikodemus at random-state.net
Mon Jul 4 15:58:52 UTC 2011


On 4 July 2011 16:11, Alessio Stalla <alessiostalla at gmail.com> wrote:
> On Mon, Jul 4, 2011 at 3:09 PM, Pascal J. Bourguignon
> <pjb at informatimago.com> wrote:
>> Nikodemus Siivola <nikodemus at random-state.net>
>> writes:
>>
>>> On 4 July 2011 14:46, Stas Boukarev <stassats at gmail.com> wrote:

>>>> * They can't be used with APPLY or FUNCALL.
>>>
>>> Actually, they can be used with FUNCALL.
>>>
>>> (Otherwise, I echo pretty much everything that Stas said.)

>> clhs define-compiler-macro: "The consequences of writing a compiler
>> macro definition for a function in the COMMON-LISP package are
>> undefined;"
>
> You, the user, can't, but Nikodemus, the implementer, can! ;)

There's a misunderstanding here. I didn't mean -- nor do I think Stas
meant -- writing a compiler-macro for APPLY or FUNCALL, but rather
having a compiler-macro take effect when the function in question is
called using FUNCALL or APPLY:

 (apply #'has-a-compiler-macro ...) ; compiler-macro will not fire

 (funcall #'has-a-compiler-macro ...) ; compiler-macro should (if
supported) fire

Cheers,

 -- nikodemus




More information about the pro mailing list