kawa-commonlisp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Kawa-commonlisp-dev] Internal symbol representation


From: Per Bothner
Subject: Re: [Kawa-commonlisp-dev] Internal symbol representation
Date: Fri, 27 Jul 2012 15:44:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 07/27/2012 12:35 PM, Charles Turner wrote:
I have some code that parses (declare (type integer fnord))
I check to see if the I'm processing it using

(case name
   ((declare) ...)
   ...)

however, name is internally represented as {COMMON-LISP}:DECLARE, so
that match fails.

My understanding is that (eq 'CL:DECLARE 'CL-USER:DECLARE)
when the current package is COMMON-LISP-USER.

I.e. the reader resolves declare to CL-USER:DECLARE but since
CL-USER "uses" CL is the symbol resolves to the (existing) one in CL.

#|kawa:589|# '(declare (type integer fnard))
(DECLARE (TYPE integer FNARD))

That is weird - who is integer lower-case?

#|kawa:590|# (invoke 'cl:car '|toString|)
COMMON-LISP:CAR
#|kawa:591|# 'cl:car
CAR

so where do you guys think this might be happening?

Both are correct: The package prefix
is ellided when the symbol is "accessible" in the current package.
However, toString should print without checking the current package,
or at least that seems reasonable.
--
        --Per Bothner
address@hidden   http://per.bothner.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]