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

Getting the type of a variable



There is a difference between the interpreter knowing the type
of a variable and interpreted user code being able to get that
information.  The interpreter, like the compiler, is a meta-program.
Type declarations are intended as meta-information; they are about
the user program, not part of it.  That is why an implementation is
allowed to ignore it.  (Unfortunately, SPECIAL declarations are part
of the program, for they affect its semantics.)
CL presently only guarantees equivalent compiled and interpreted
semantics for correct programs, that is, programs that never do
anything that "is an error".  It "is an error" for a variable to
take on a value not of a type compatible with any type declaration
for that variable.