[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] [wg2] in support of single-arity procedural syntax transformers

I would like to argue in favor of triple-arity, single-return syntax

That is to say, the following should be a valid, though non-terminating,

  (define-syntax id
    (lambda (x use-env mac-env)

As should this:

  (define-syntax else
    (lambda (x use-env mac-env)
      (error "else referenced in invalid context")))

Triple-arity is the right answer for implementers that want to
experiment with different macro systems, because it presents a uniform,
extensible macro transformer interface -- you have full information
of the expression, its usage environment, and the environment the
macro was originally defined in.

It also happens to be the underlying implementation used in
most ER macro systems, and WG2 has already voted to
provide ER macros.


Scheme-reports mailing list