From: Kaz Kylheku
Subject: Scheme-like macro defining for Common Lisp.
Date: 
Message-ID: <ab1d7.42811$B37.915854@news1.rdc1.bc.home.com>
Anyone use this? 

http://www.cs.rice.edu/~dorai/mbe/mbe-lsp.html

Cool stuff! :)

From: Dave Bakhash
Subject: Re: Scheme-like macro defining for Common Lisp.
Date: 
Message-ID: <c29pua2masx.fsf@nerd-xing.mit.edu>
···@ashi.footprints.net (Kaz Kylheku) writes:

> Anyone use this? 
> 
> http://www.cs.rice.edu/~dorai/mbe/mbe-lsp.html

I've tried it, and it works.  However:

> Cool stuff! :)

I'm not sure.  It's certainly an excellent macro.  It's neat, and
well-implemented.  But the bottom line is that DEFMACRO is probably the
right tool for about 95% of macro usage.  I was excited about the
scheme-style macros too, until I realized that it really didn't simplify 
much, and it weakened the macro system.

dave
From: Nicolas Neuss
Subject: Re: Scheme-like macro defining for Common Lisp.
Date: 
Message-ID: <wsvgjtatoh.fsf@ortler.iwr.uni-heidelberg.de>
Dave Bakhash <·····@alum.mit.edu> writes:

> ···@ashi.footprints.net (Kaz Kylheku) writes:
> 
> > Anyone use this? 
> > 
> > http://www.cs.rice.edu/~dorai/mbe/mbe-lsp.html
> 
> I've tried it, and it works.  However:
> 
> > Cool stuff! :)
> 
> I'm not sure.  It's certainly an excellent macro.  It's neat, and
> well-implemented.  But the bottom line is that DEFMACRO is probably the
> right tool for about 95% of macro usage.  I was excited about the
> scheme-style macros too, until I realized that it really didn't simplify 
> much, and it weakened the macro system.
> 
> dave

I have not used those macros, but I am also not too eager to try.  The
description says that they fail in one of the major pluses of
'define-syntax' and relatives, because they are not hygienic
(i.e. they do not avoid variable capturing).

(I have heard of that emulation before, and thought that they would be
hygienic, so I was somewhat disappointed.)

Nicolas.
From: Dorai Sitaram
Subject: Re: Scheme-like macro defining for Common Lisp.
Date: 
Message-ID: <9l8qvu$5m$1@news.gte.com>
In article <··············@ortler.iwr.uni-heidelberg.de>,
Nicolas Neuss  <·····@ortler.iwr.uni-heidelberg.de> wrote:
>Dave Bakhash <·····@alum.mit.edu> writes:
>
>> ···@ashi.footprints.net (Kaz Kylheku) writes:
>> 
>> > Anyone use this? 
>> > 
>> > http://www.cs.rice.edu/~dorai/mbe/mbe-lsp.html
>> 
>> I've tried it, and it works.  However:
>> 
>> > Cool stuff! :)
>> 
>> I'm not sure.  It's certainly an excellent macro.  It's neat, and
>> well-implemented.  But the bottom line is that DEFMACRO is probably the
>> right tool for about 95% of macro usage.  I was excited about the
>> scheme-style macros too, until I realized that it really didn't simplify 
>> much, and it weakened the macro system.
>
>I have not used those macros, but I am also not too eager to try.  The
>description says that they fail in one of the major pluses of
>'define-syntax' and relatives, because they are not hygienic
>(i.e. they do not avoid variable capturing).
>
>(I have heard of that emulation before, and thought that they would be
>hygienic, so I was somewhat disappointed.)

I didn't think there was much demand for hygiene and
indeed quite the opposite.  Implementing hygiene
requires the exact list of CL's core special forms
(i.e., those that can't be macroexpanded away), at
least the binding ones.  I think there is such a
list, and when I get some time, I'll use it to
hygienize the implementation.  

Thanks to Kaz and Dave for their comments on mbe.  I
too am partial to defmacro (even in a Lisp1, for which
I've received my share of ear-tweaking on this
NG), and wrote mbe to help in porting known programs
rather than as a general tool.  To cover the case that
it is used for general macro definition, I'd included
the "with" keyword to tackle variable capture.

I must also add that I assume there are other (perhaps
many) implementations of define-syntax for CL.  My
implementation can adopt hygiene, but the simplicity of
its design precludes that it will ever be
"referentially transparent", yet another requirement on
the Scheme macro system -- the other
implementations might be better in this regard.

--d