[R6RS] Internal DEFINE vs. macros

Michael Sperber sperber
Tue Apr 12 02:48:19 EDT 2005

>>>>> "Kent" == R Kent Dybvig <dyb at cs.indiana.edu> writes:

Kent> [...] I agree that making top-level and internal contexts behave
Kent> similarly would be useful.  What people usually mean by this is
Kent> that internal contexts should behave like their favorite Scheme
Kent> system's interactive top-level environment behaves [...]

Ah, sorry, I should have said that more precisely:

I didn't mean the interactive top-level, but rather the outermost
level of the core language.  This is inherently different from
internal contexts because of shadowing.  The semantics of this should
be specified as precisely as that of internal contexts for the same

Kent> Yes, I can and will if I end up writing up a syntax-case
Kent> proposal more formally.  I believe it can be reasonably simple.

Will that end up describing what Chez currently does?  This kind of
dichotomy confuses me, leaving aside for a moment the issue of

(let-syntax ((bar (syntax-rules ()      (let ((bar					 
		    ((bar) 'outer))))          (lambda () 'outer)))			 
  (define-syntax bar                      (define bar					 
    (syntax-rules ()                        (lambda ()					 
      ((bar) 'inner)))                        'inner))					 
  (bar))                                  (bar))
   => 'outer                               => 'inner

Can you give a preview of how to explain this behavior?

Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla

More information about the R6RS mailing list