[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pending branch: lexical-literals
From: |
Andy Wingo |
Subject: |
Re: pending branch: lexical-literals |
Date: |
Fri, 06 May 2011 19:39:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
On Fri 06 May 2011 14:17, address@hidden (Ludovic Courtès) writes:
> Sorry for the late reply.
No prob; thanks for thinking through it!
> So, with this change, no top-level binding of ‘else’ is /required/, but
> /when/ there is one, it prevails over the literal, correct?
Sorta? This language is imprecise. The real language is in R6RS:
The free-identifier=? procedure returns #t if and only if the two
identifiers would resolve to the same binding if both were to appear
in the output of a transformer outside of any bindings inserted by
the transformer. (If neither of two like-named identifiers resolves
to a binding, i.e., both are unbound, they are considered to resolve
to the same binding.)
Nothing changes in the case that `else' is unbound always.
The change is if it is bound when the macro is defined, but not when it
is used, or vice versa; or, also, if it is bound at both places, but to
different lexical or toplevel variables. In these cases the
lexical-literals branch causes the literals not to match.
OTOH currently a keyword imported under a different name will not match
itself; this branch allows renaming keywords.
> But then I don’t understand how the story that you could import/rename
> ‘else’ fits into this.
I guess basically the summary is "compare literals by identity, not by
name".
Andy
--
http://wingolog.org/