I'm having trouble tracking down where it is specified how the reader
should behave when reading a symbol with a package marker (:) in it
that doesn't exist. Section 2.3.4 talks about what tokens will be
interpreted as symbols and then goes on to describe how a symbol will
be looked up in the current package. But that description can't be
right for tokens containing with explicit package markers. My
understanding of the actual behavior is:
- A symbol with two colons will be looked up in the appropriate
package. If the symbol is available in that package it is
returned; otherwise a new symbol will be created and interned in
that package.
- A symbol with one colon (leaving aside keyword symbols) will be
lookup up in the appropriate package. If it is available and
external, it is returned. If it is available but is not external
an error will be signaled. If no such symbol is available an error
will be signaled.
I was just trying to confirm that understanding when I discovered I
couldn't track it down in the standard. Any pointers to the chapter
and verse I missed?
-Peter
--
Peter Seibel ·····@javamonkey.com
Lisp is the red pill. -- John Fraser, comp.lang.lisp
Peter Seibel <·····@javamonkey.com> wrote:
> I was just trying to confirm that understanding when I discovered I
> couldn't track it down in the standard. Any pointers to the chapter
> and verse I missed?
How about...
2.3.5 Valid Patterns for Tokens
Cheers,
-- Nikodemus
·········@random-state.net writes:
> Peter Seibel <·····@javamonkey.com> wrote:
>
>> I was just trying to confirm that understanding when I discovered I
>> couldn't track it down in the standard. Any pointers to the chapter
>> and verse I missed?
>
> How about...
>
> 2.3.5 Valid Patterns for Tokens
Duh. Thanks. (I even read that but somehow blipped over all the
sentances starting with "For example" that contain the stuff I was
looking for.)
-Peter
--
Peter Seibel ·····@javamonkey.com
Lisp is the red pill. -- John Fraser, comp.lang.lisp