On Jun 19, 2009, at 12:04 PM, Derick Eddington wrote:
On Fri, 2009-06-19 at 08:34 +1000, Ramana Kumar wrote:
Does anyone know what a template id is?
I think it's obvious the wording is unintentionally wrong, and it's
obvious that "template id" means "identifier". R6RS makes it clear
that syntax templates can occur outside syntax-case (otherwise their
usefulness would be crippled);
I agree that this is the current semantics as I understand it.
and likewise, for datum->syntax to be generally useful, it needs to
take any identifier. It would be absurd for datum->syntax to not
take any identifier.
I'm not in 100% agreement with this. If datum->syntax is restricted
to take identifiers only from the input of the macro, that would allow
implementations to make private library bindings truly private so that
they can, say, be optimized away, reclaimed by GC, etc, by only making
the identifiers that appear inside syntax templates implicitly exported.
Right now, if there's a single #'id in a library, you cannot at macro
expansion time determine if it's ever gonna end up as as argument to
datum->syntax, thus, you have to be conservative and make every bound
identifier a potential export. So, one could perceive of a semantics
in which #'id only captures id (or nothing at all), instead of grabbing
the whole blasted environment and I don't think that's too absurd.
(though it does limit what you can do)
Aziz,,,