This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

using Kawa's extended lambda formals syntax in macros



Hoehle, Joerg-Cyril <Joerg-Cyril.Hoehle@t-systems.com> wrote:
> (defmacro foo (stmt #!rest bar)
>   `(list ,stmt ,@bar))

and

> b) Or use ancient-style dot-notation instead of #!rest destructuring
>    (that's been in some Lisps for decades, and it's also the normal
>    way in Scheme).

Exactly. 

  (defmacro foo (stmt . bar) `(list ,stmt ,@bar))

I hope that "ancient-style" doesn't mean anything pejorative.

If you're in the Scheme language this is the behavior I expect.  If you
are in CL the right thing is to support the complete Macro Lambda Lists,
but I wouldn't expect that to work as the Kawa CL implementation is very
incomplete.

Please note the difference in the documentation between

        defmacro name lambda-list form ...
and
        LAMBDA-EXPRESSION ::= (lambda FORMALS [RTYPE] BODY)

one is for defmacro, the other for Scheme lambda forms.


Regards,
Chris Dean


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]