[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bawden's Alternate Proposal
Date: Mon, 21 Jul 86 17:55:05 EDT
From: Alan Bawden <ALAN@AI.AI.MIT.EDU>
This is correct. Since function names are lexically scoped, you can call
the inner function something other than FOO with only a minor change to
your program. Is this situation actually common in anyone's code?
It sounds like the basic idea of your proposal could be described as
follows: to keep everything simple and clear, get rid of the whole idea
of non-pervasive declarations. Everything is pervasive. Also,
everything applies (pervades) exactly around a specific lexical
enclosure, which is either the LOCALLY form, or the body of the special
form with a DECLARE in it. Why are non-pervasive declarations
flushable? Because the only reason for them was to affect one variable
named, say, "foo", without affecting another named "foo", and since
everything is lexically scoped, you can always just rename the other
"foo" to prevent the declaration from affecting it. That way, you don't
need the "fine control" provided by non-pervasive declarations.
I do like the idea of simplifying the rules as much as possible.
However, I am not completely happy with this as a philosophy for the
language. After all, we have a whole set of scoping rules designed to
deal with things like:
(let ((a ---))
...
(let ((a ---))
...))
While you're at it, you could simplify the scoping rules as well, by simply
not allowing such constructs; the user can always change the name of the
inner "a".