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

Compile-time enforcement of Common Lisp type declarations



   Date: Wed, 1 Mar 89 15:35 EST
   From: Barry Margolin <barmar@Think.COM>

       Date: Wed, 1 Mar 89 10:04:14 PDT
       From: gyro@kestrel.arpa (Scott B. Layson)

       However, type checking is not done for DEFSTRUCT slots, at either
       compile or run time.  (I tried it.)

   It would not be correct to complain about the type of the default value
   of a slot at compile time.  CLtL doesn't actually say this, but it came
   up in X3J13 and the ANSI CL spec will make this clear.

Apologies for excessive terseness.  What I tried was not a default
value but an actual SETF of the slot, which I had declared :TYPE
FIXNUM, to a symbol (written AS a quoted symbol in the code, so the
compiler could easily see its type).

-- Scott