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: Dr. Arne Babenhauserheide
Subject: Re: Breaking hygiene with syntax-rules?
Date: Fri, 11 Aug 2023 10:33:52 +0200
User-agent: mu4e 1.10.5; emacs 29.0.92

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).

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

Attachment: signature.asc
Description: PGP signature


reply via email to

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