guile-devel
[Top][All Lists]
Advanced

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

Re: syntax-local-binding


From: Mark H Weaver
Subject: Re: syntax-local-binding
Date: Fri, 20 Jan 2012 15:26:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Andy Wingo <address@hidden> writes:
>     `lexical'
>           A lexically-bound variable.  The value is a unique token (in
>           the sense of `eq?') identifying this binding.
>
>     `macro'
>           A syntax transformer, either local or global.  The value is
>           the transformer procedure.

Ironically, `syntax-local-binding' renders the current simple
implementation strategy of `the-environment' inadequate, because
identifier-syntax is no longer sufficient to simulate a lexical.

More importantly, this exposing of internal binding representations will
interfere with our ability to change the representations later.

In particular, I was hoping to change the binding representation of
`syntax-rules' macros so that they are serializable.  In particular,
they would be represented by the `syntax-rules' form itself (the same
one that psyntax currently passes to `primitive-eval' to produce the
transformer procedure).  A weak-key hash table would cache the compiled
transformer procedures.

This would allow (the-environment) to capture locally-bound
`syntax-rules' macros.  Unfortunately, `syntax-local-binding', as
currently documented, now makes this impossible.

    Thanks,
      Mark



reply via email to

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