Subject: Re: Counting namespaces, was Re: scheme seems neater
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 08 Apr 2004 04:26:44 -0500
Newsgroups: comp.lang.lisp
Message-ID: <CtudncvIYJpJh-jdRVn-ig@speakeasy.net>
Jeff Dalton  <jeff@todday.inf.ed.ac.uk> wrote:
+---------------
| tar@sevak.isi.edu (Thomas A. Russ) writes:
| > In addition to namespaces for variables and functions,
| > Common Lisp also has namespaces for:
| >    classes
| >    packages
...
| There's a namespace of go tags and another for block names,
| so that CL is a Lisp-4.
| 
| There might be some ones added after CLTL 1, but I don't
| remember any off hand.
+---------------

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. And Pekka Pirinen <pekka@harlequin.co.uk>
in <URL:news:ix6734k5a0.fsf@gaspode.cam.harlequin.co.uk> says you
should add structures, methods, method combinations, and SETF methods.
Some might even add LOOP keywords, since they can't be shadowed.
What's that now, 12? 13?  But in any case, probably at least 11 or
12 of the following 13:

    - Functions & macros
    - lexical variables
    - special variables
    - types and classes
    - GO tags
    - block names
    - structures
    - SETF methods
    - compiler macros
    - methods
    - method combinations
    - declaration specifiers (not types, things like IGNORE, INLINE, etc.)
    - (LOOP keywords?)

Not to mention that each defined package adds a nearly-full set of
additional namespaces.


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607