On Tue, Jul 3, 2012 at 12:41 AM, Ludovic Courtès <l...@gnu.org> wrote:

> Hey!
>
> Stefan Israelsson Tampe <stefan.ita...@gmail.com> skribis:
>
> > Maybe this help to see what I'm after,
> >
> > #'(let ((x v)) #.(f #'x))
> >
> > <=>
> >
> > (let-syntax ((g (lambda (stx) (syntax-case  stx ((_ x) (f #'x)))))
> >    #'(let ((x v)) (g x))
>
> Sorry, I fail to understand the problem you’re trying to solve.
>
> Hmm The #' probably need to be moved to the left of the expression and
there might be problems with phases in this analogy but I guess you saw
that I wanted to spin the function f on a syntax argument that contained
the binding of x done in the let which is not the case If you do a simple #,


The above idiom is not frequent to the point that special syntax is
> needed, is it?
>
>
If you want to code your macros like Alex does in ice-9/match.scm then it's
not a problem.
If you want to try another path using functions in stead of macros and
working hard with #, and #,@
you will for complex macros like a matcher need to gensym by hand or
destroy the readability of the
code. As illustrated by the simple example above. It's not that a
devastating issue because I have coded quite a lot of CL macros before and
can cope with gensymming, but I find it frustrating to know that there
probably exists a better way.


> Thanks,
> Ludo’.
>

/Stefan

Reply via email to