Thomas Bushnell, BSG scripsit:
It's not clear to me that binding keywords ought to be allowed at all.
> In the context, it's been bound. If ,%: returns the keyword instead
> of the value of the local variable, it's a bug.
What benefit does that provide? Normally, we rely on keywords being
Normally we rely on IF to be a special-form too. But Scheme does the Right Thing by letting you bind any name you want, and treating all names as the same.
The instinct here comes from the fact that keywords look like syntax, but really are just self-evaluating symbols, and so suddenly people want them to behave like syntax. But even then, note that syntax in Scheme is also constructed from identifiers which can be rebound if you like.
(let ((lambda ...)) ...)
(let ((foo: ...)) ...)
(let ((=> ...)) (cond ...))
should all work.
And, since the binding is lexically apparent, there isn't any need for special warnings.
In the case Felix identified, if the binding doesn't shadow the top-level self-evaluating bit, then that's a bug, not call for a warning.