Brian Mastenbrook <NOSPAMbmastenbNOSPAM@cs.indiana.edu> wrote:
+---------------
| Rob Warnock <rpw3@rpw3.org> wrote:
| > Looking at CLHS "3.1.1.1 The Global Environment" we see at least 5,
| > and adding "3.1.1.3 Lexical Environments" we see 3 or 4 more (4 if
| > you count "compiler macros that are locally disabled"), for a grand
| > total of 8 or 9 at least. ... But in any case, probably at least 11 or
| > 12 of the following 13:
|
| Counting global namespaces has a problem: any function that keeps an
| alist of bindings around adds a new one. Thus, it's really only sane to
| count lexical namespaces. The declaration lexical environment simply
| modifies existing bindings, instead of adding new ones, so it's not
| really a namespace to itself. Thus, CL is a Lisp-4.
+---------------
I disagree. But perhaps you misunderstood what I meant about "declarations":
I was referring to the namespace *of* declarations, not the namespace of
things they describe. That is, the existence of the INLINE declaration
does not in any way preclude using "INLINE" for the name of a function,
a variable, a block name, or a GO tag. This is true for all of the other
declarations words as well (including those the user might add with the
DECLARE DECLARATION declaration), excepting only those which are shorthand
for type declarations. Thus the *language* of declarations is in a separate
namespace from the 4 you mention. Likewise, type and class names (together)
are mostly disjoint from other previously-mentioned 5 (with the previously-
noted exception of using some type names as declarations), so they too are
in a separate namespace. And I really think one should include LOOP keywords
as a "namespace", since they don't really conflict with variable or function
names [though see below as to whether they should be merged with all other
"marker" uses of symbols].
Keeping this more restricted notion of "conflict" in mind, I might be
willing to concede that special variables & lexical variables are in
the same namespace, since a special declaration (explicit or implicit)
trumps the lexical status of a variable of the same name in scope.
Likewise, I won't argue very hard about SETF methods, methods (since
they conflict with functions) and method combinations (which are just
"markers" much like CATCH tags [or LOOP keywords, hmmm...]). But even
so, one is still left with at least 6 classes of non-conflicting uses
of the same symbol which can appear in the same lexical scope. Hence
I would still claim that CL is at least a Lisp-6.
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607