[r6rs-discuss] Comments on syntax-rules

From: David Van Horn <dvanhorn>
Date: Wed Nov 1 15:20:27 2006

A few notes and questions on syntax-rules:

1) With the addition of <fenders> into the language of syntax-rules, the
following no longer seems true:

- a facility (syntax-case; see chapter 17) for creating
transformers via a pattern language that permits the
use of arbitrary Scheme code, and a derived facility
(syntax-rules; see section 9.21) for creating transformers
via the pattern language only.

Since <fender> may make use of arbitrary Scheme code.

2) Why not make syntax-rules evaluate to a transformer procedure? This
is common among R5RS implementations that support syntax-case, where
they often use the definition of syntax-rules from TSPL:

(define-syntax syntax-rules
   (lambda (x)
     (syntax-case x ()
       ((_ (i ...) ((keyword . pattern) template) ...)
        (syntax (lambda (x)
                  (syntax-case x (i ...)
                    ((dummy . pattern) (syntax template))
                    ...)))))))

This would make some of the language surrounding define-, let-, and
letrec-syntax clearer. For example, it would seem that syntax-rules
transformers are disallowed in (r6rs syntax-case) because "A
Received on Wed Nov 01 2006 - 15:20:19 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC