David Hanley <[EMAIL PROTECTED]> writes:

> --- Christophe Rhodes <[EMAIL PROTECTED]> wrote:
>
>> That's right. The result will have to be boxed to be
>> stored in
>> hash-code, since it can be accessed from anywhere,
>> and must look like a
>> lisp object.
>
> Hm.  Ok, but presumably, the type declaration is
> visible from anywhere that the variable is also
> visible from? 

Apart from the GC issues (which could be worked around), the type
declaration isn't necessarily visible where the variable can be
accessed, e.g.:

(defun access-it ()
  (declare (special hash-code))
  (* hash-code 547))

...

(declaim (type hash-type hash-code)) 
(defparameter hash-code 0)

Or think of symbol-value.

So some form of special steps have to be taken to ensure that code
that only expects a normal lisp object (i.e. a fully tagged word) will
find it where expected...

Regs, Pierre.

-- 
Pierre R. Mai <[EMAIL PROTECTED]>                    http://www.pmsf.de/pmai/
 The most likely way for the world to be destroyed, most experts agree,
 is by accident. That's where we come in; we're computer professionals.
 We cause accidents.                           -- Nathaniel Borenstein


Reply via email to