Subject: Re: atoms in a list interned when called by another package. why?
From: (Rob Warnock)
Date: Thu, 17 Jul 2008 20:28:53 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Zach Beane  <> wrote:
| (Pascal J. Bourguignon) writes:
| > KEYWORD is an exception in that the package name is optional in the
| > fully qualified notation:
| >              :ANY-SYMBOL
| >             ::ANY-SYMBOL
| > is the same keyword.
| Here's a tangent, which I point out because I only recently learned of
| it myself, from 2.3.5:
|   The valid patterns for tokens are summarized in the next figure. [2-17]
|   ::aaaaa            undefined                                          
| That is, the syntax "::ANY-SYMBOL" is undefined,
| not necessarily a reference to the keyword :ANY-SYMBOL.

While the CLHS certainly does say that,
CLISP & CMUCL *do* both support that pattern:

    cmu> ::foo


which is fine, since CLHS 2.3.5 item #5 explicitly *permits* this:

    5. The consequences are unspecified if any other pattern of
       package markers in a token is used. All other uses of package
       markers within names of symbols are not defined by this
       standard but are reserved for implementation-dependent use.

Similarly, both CLISP & CMUCL reject :::FOO.

    cmu> (princ (nth-value 1 (ignore-errors (read-from-string ":::foo"))))
    Reader error at 3 on #<String-Input Stream>:
    too many colons after #<The KEYWORD package, 0/2 internal,
                            1795/2187 external> name
    #<READER-ERROR {4895FFDD}>

I'm guessing that most CLs do the same as CLISP & CMUCL do here.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607