guile-user
[Top][All Lists]
Advanced

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

Re: Breaking hygiene with syntax-rules?


From: Jean Abou Samra
Subject: Re: Breaking hygiene with syntax-rules?
Date: Sat, 12 Aug 2023 01:57:42 +0200
User-agent: Evolution 3.48.4 (3.48.4-1.fc38)

Le vendredi 11 août 2023 à 10:33 +0200, Dr. Arne Babenhauserheide a écrit :
> 
> Jean Abou Samra <jean@abou-samra.fr> writes:
> 
> > This is a known limitation in Guile. Please read
> > https://www.gnu.org/software/guile/manual/html_node/Hygiene-and-the-Top_002dLevel.html
> 
> I would not expect that effect from the description, because in
> 
> (define-syntax unhygienic
>   (syntax-rules ()
>     ((_ the-pair fetch)
>      (begin
>        (define the-head (car the-pair))
>        (define (the-proc) the-head)
>        (define (fetch) the-head)))))
> 
> the-head depends on (car the-pair) and the-pair is a variable passed to
> the macro. So I would expect this to create different identifiers for
> different values of the-pair, just like it creates different identifiers
> when instead of (car the-pair) I use fetch (also passed from outside).


You're right, that's confusing.

I don't have the time to investigate, though.


Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]