guile-devel
[Top][All Lists]
Advanced

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

Re: mark uniqueness


From: Mark H Weaver
Subject: Re: mark uniqueness
Date: Tue, 24 Jan 2012 19:26:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Andy Wingo <address@hidden> writes:

>   (define-syntax-rule (define-const x val)
>     (begin
>       (define t val)
>       (define-syntax x (identifier-syntax t))))
>
> Here, `t' will have a fresh mark.
>
> Now, if in one compilation unit, I do:
>
>   (define-const x 10)
>
> And in another, I do:
>
>   (let ((t 20))
>     x) => ?
>
> You would expect the result to be 20.  But I think it could be 20, if
> the marks on the two "t"s happened to collide.

Ah yes, indeed you are right.  Thanks for this explanation.  I guess we
need universally-unique gensyms for marks at least, regardless of which
`local-eval' implementation we use.

    Thanks,
      Mark



reply via email to

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