[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Types in CL
- To: Jeff Barnett <firstname.lastname@example.org>
- Subject: Types in CL
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Thu, 17 Dec 87 17:46 EST
- Cc: common-lisp@SAIL.STANFORD.EDU
- In-reply-to: The message of 17 Dec 87 13:48 EST from Jeff Barnett <email@example.com>
Date: Thu, 17 Dec 87 10:48:05 PST
From: Jeff Barnett <firstname.lastname@example.org>
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.