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

Re: Types in CL

Your claim that the compiler should inhibit (SETF (AREF A 0) A) is only valid 
if A is declared of type T1.  It may not be.  What you are pointing out is
that there is a problem if one tries to determine the type of an object (or
its type membership status) *after* the object is created.  In fact, the
runtime package and compiler can offer you more protection if an object is
marked with a type when it is created; only then can modifications and so on
be checked locally.  However this loses something that may not be obvious: an
object can not be referenced by a register unless its marked type entails ALL
type restrictions imposed by the reference.  It is not sufficient that its
current configuration passes muster.
P.S.  The barber is an old friend.