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

Types in CL



    Date:     Thu, 17 Dec 87 10:48:05 PST
    From:     Jeff Barnett <jbarnett@nrtc.northrop.com>

    PROBLEM I.  Assume that the following have been evaluated
	    (DEFTYPE T1 '(ARRAY T2 1))
	    (DEFTYPE T2 '(NOT T1))
    Let A be a one-dimensional array of size 1 such that (EQ A (AREF A 0)).
    What should the value of (TYPEP A 'T1) be?

You need to re-read the definition of the ARRAY type specifier
on CLtL page 46, being careful also to read page 45, which doesn't
look it's part of this, but is necessary in order to understand it.
The -element-type- portion of the ARRAY type specifier doesn't mean
what you think it means.

This is interesting, because your "Problem I" is a good argument against
proposals that have been raised from time to time to change the definition
of the ARRAY type specifier to be what you thought it was.

This is probably all a digression from your real point.  Since DEFTYPE
can do anything, especially in connection with SATISFIES, it is certainly
possible to create logically inconsistent type specifications, even though
the particular example you gave is not actually one.