[r6rs-discuss] [Formal] Violation of lexical scoping

From: AndrevanTonder <andre>
Date: Tue Oct 24 10:44:06 2006

On Tue, 24 Oct 2006, Abdulaziz Ghuloum wrote:

> On Oct 23, 2006, at 1:52 PM, AndrevanTonder wrote:
>>
>> Suggestion:
>> -----------
>>
>> The algorithm described in the first paragraph of p.28 may also have to
>> record the arguments of each use of free-identifier=?. This is, however,
>> likely to be expensive.
>
> Expenses aside, what are you going to do with the recorded list of arguments
> for each call to |free-identifier=?|? You don't intend to disallow the
> definition of an identifier just because some macro called some predicate on
> it, do you?

I do not want to (it's a pain to implement) but if I don't, the examples show
that a semantics that violates lexical scoping is assigned to certain valid
Scheme expressions. That's a deal-breaker.

The second example also shows that the result of the predicate may "identify
one of the body forms as a definition" (to quote the first sentence on page 28).
The proposed algorithm of the same paragraph already goes to considerable pains
to avoid this kind of issue, but the examples show that it is not comprehensive
enough.

> You don't intend to disallow the
> definition of an identifier just because some macro called some predicate on
> it, do you?

I am not married to this implementation of it, as long as one can find another
way to avoid the stated violation of lexical scoping. I think it is essential
to find one. Do you have any suggestions?

Cheers
Andre
Received on Tue Oct 24 2006 - 10:40:37 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC