[plt-scheme] On hygiene and trust
On Tue, Jul 7, 2009 at 6:36 AM, Grant Rettke<grettke at acm.org> wrote:
>
> The reason I think about this is that on a mostly Lisper mailing list
> someone asked me why hygiene is better, and barring simply hygiene
> examples that I can explain, I don't understand the deeper issues. I
> couldn't explain it.
There are two issues. First is whether hygiene is good. Hygienic macros are
simply lexical scoping applied to macros. If you like lexical scoping
and you want it
to keep working when you add macros to the language, you need hygiene.
If you want the *default* to be lexical scoping, then hygienic
expansion should be
the default mode of operation.
The second issue is how hygienic macros are implemented and defined,
and whether,
and how one goes about bypassing the hygiene. The current solutions seem a bit
kludgy to me. syntax-rules works well for simple macros, but is a pain for more
complex ones. Syntax-case is uniformly painful for simple and complex uses.
defmacro is really easy to use and understand, but isn't hygienic.
--
~jrm