[plt-scheme] let-syntax bug

From: Andre van Tonder (andre at het.brown.edu)
Date: Thu Apr 8 14:50:25 EDT 2004

On Thu, 8 Apr 2004, Bradd W. Szonye wrote:

> In short, I think your analogy leads to an attempt to "return" an
> internal definition somehow, which is currently an error both for normal
> expressions and for syntax. Furthermore, it's an error for a good
> reason: permitting it would break scoping.

Yet the same argument could be made against

(define-syntax foo
  (syntax-rules ()
    ((foo bar) (define-syntax bar
                 (syntax-rules () 
                   ((bar) 'hello))))))

which returns a definition but is indeed valid Scheme, and which would be
analogous to

(define foo
  (lambda ()
    (begin 
      (define bar ......)))))

which attempts to return a defition and is invalid.  



Posted on the users mailing list.