[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] [wg2] in support of single-arity procedural syntax transformers
On Wed, May 11, 2011 at 12:56:00PM +0100, Alaric Snell-Pym wrote:
> On 05/11/11 12:41, Alex Shinn wrote:
> > Are you actually arguing that MIT Scheme, Chicken,
> > Chibi, riaxpander and others should have to rewrite
> > their entire macro system? When there's a trivial
> > compromise available?
> What trivial compromise do you have in mind, Alex?
> Mine is that the exact nature of an expander is
> implementation-dependent, and that's what macros like "syntax-rules" et
> al are for: to map from standard forms into the common one. Might not
> even be a closure, although that is an obvious choice?
I think that's the sensible thing to do. Passing "bare" lambdas
to define-syntax should be deprecated and I don't see why the
behavior when you do this has to be (over)specified at all.
The procedures or syntactic forms er-macro-transformer,
sc-macro-transformer, syntax-case and syntax-rules already
hide the implementation details well enough.
Now, if you want to argue that "er-macro-transformer" should
accept a procedure that accepts one argument instead of three,
I think that's a different discussion. If this is considered
necessary, please use a different name so that programs using
er-macro-transformer keep working.
Maybe something like syntax-er or er-syntax-transformer (though
the latter might be too confusingly similar)
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
Scheme-reports mailing list