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

I'm not doing a good job



   Date: Fri, 6 Nov 92 14:59:26 -0500
   From: "Aubrey Jaffer" <jaffer@martigny.ai.mit.edu>
   To: rrrs-authors@ai.mit.edu
   Subject: draft minutes of June 1992 meeting
   Since macros will be included in the Report, some things need to be
   clarified:

   In the first column of the Macro Appendix is the claim "With this
   extension, there are no reserved identifiers."  This seems ridiculous!
   What about LET-SYNTAX, LETREC-SYNTAX, SYNTAX-RULES, DEFINE-SYNTAX, and
   BEGIN?

It doesn't seem ridiculous to me.  What about them?  Do you see problem
with `begin' (for example) being an ordinary name that happens to be
defined as a keyword initially (just as `car' is initially defined as an
identifier)?  If you do, then you better spell it out, because it isn't
obvious to me, and I suspect it isn't obvious to many other people as well.

   Although the Appendix says that "DEFINE-SYNTAX, ... are analogous to
   DEFINE ...", I don't see how DEFINE-SYNTAX can reasonably interract
   with a dynamic top level define.  For instance:

     (define (foo x) (+ 1 x))
     (define (bar x) (foo (foo x)))
     (define-syntax foo
       (syntax-rules () ((foo var) ''var)))
     (bar 3)

   What should (BAR 3) return?

I don't know, but I don't think the fact that `foo' was redefined from
being an identifier into being keyword has anything to do with the answer.
Suppose the example had instead been:

  (define-syntax foo
    (syntax-rules () ((foo var) '(+ 1 var))))
  (define (bar x) (foo (foo x)))
  (define-syntax foo
    (syntax-rules () ((foo var) ''var)))
  (bar 3)

What should `(bar 3)' return now?  I would assume that each implementation
has its own story to tell about what happens when a name is syntactically
redefined -- the answers in both examples should be analogous.

Clarifying issues like this are why I find the notion of there being a
"syntactic environment" so compelling.