[plt-scheme] define-for-syntax, or lack thereof

From: Lauri Alanko (la at iki.fi)
Date: Sat Aug 3 16:48:55 EDT 2002

On Sat, Aug 03, 2002 at 06:32:22AM -0600, Matthew Flatt wrote:
> In the next iteration of modules, I plan to add `begin-syntax'.

Ooh, neato. If you are cleaning up the syntax implementation, would it
also make sense to add a primitive "inline-syntax" for inserting
generated code without having to name a macro? It can of course be
implemented already:

(define-syntax inline-syntax 
  (syntax-rules () 
    ((_ s) (let-syntax ((dummy (lambda (stx) s))) dummy))))

but this is about as pretty as the following:

(define-syntax silly-lambda
  (syntax-rules ()
    ((_ parms . body) (let () (define (dummy . parms) . body) dummy))))

Oh, and while I'm at this, how about adding a way to splice the returned
syntax list into the context? Begin isn't always quite enough...


Lauri Alanko
la at iki.fi




Posted on the users mailing list.