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

Re: Unhygienic macros



On Sun, Dec 09, 2001 at 10:47:31PM -0500, Shriram Krishnamurthi wrote:
> I could write 
> 
>   (syntax _)
> 
> for the first argument, but I prefer to think of IT as if it were
> bound by the TEST expression.  This has some good uses -- if anyone
> cares, I can post them here.

Actually, I'd like to hear them. Since "datum->syntax-object" is such a
horrendously clumsy name, I was considering using a form like:

  (define-syntax syntax-case/unhygienic
    (syntax-rules ()
      ((_ stx lits (unhyg1 ...) match1 match2 ...)
       (with-syntax ((unhyg1 (datum->syntax-object stx 'unhyg1))
                     ...)
         (syntax-case stx lits
           match1 match2 ...)))))

where you could just list those identifiers that are to be bound "after
expansion", so to say. But if there are some pitfalls to using the
entire expression (stx) as the context, I may have to think of something
else.


Lauri Alanko
la@iki.fi