|
From: Pascal B. <pj...@in...> - 2003-05-07 15:01:04
|
Christophe Rhodes writes: > [ off-list to give you a chance to reflect. ] Thank you :-)=20 > Pascal Bourguignon <pj...@in...> writes: >=20 > > Christophe Rhodes writes: > >> Pascal Bourguignon <pj...@in...> writes: > >>=20 > >> > The point is that while a (ARRAY (ARRAY BASE-CHAR *) *) has t= o be > >> > implemented as an (ARRAY T *), it must not forget that it cont= ains > >> > actually (ARRAY BASE-CHAR *). > >>=20 > >> Yes it must. It is required to by the ANSI standard for the > >> language. See the CLHS page for System Class ARRAY: > >>=20 > >> If element-type is the symbol *, arrays are not excluded on the > >> basis of their element type. Otherwise, only those arrays are > >> included whose actual array element type is the result of upgradin= g > >> element-type; see Section 15.1.2.1 (Array Upgrading). > > > > Beware, I've always specified the type of the elements. I've only use= d > > the * wildcard for the dimension. >=20 > Perhaps you failed to read the second sentence of the quote? Yes. You're right. That's unfortunate. They link such a high level expression as: (ARRAY (ARRAY BASE-CHAR *) *) to an implementation detail such as UPGRADED-ARRAY-ELEMENT-TYPE. This is without much consequence until you treat type declarations as assertions. So the standard imposes for arrays something like if we said: (declare (fixnum 0 10) x) but because x would be implemented as a signed short anyway, it should be treated as: (declare (fixnum -32768 32767) x) and: (incf x 30000) should not raise any exception. It feels wrong (particularly given that I have today a computer that's 100 times more powerful than 10 years ago when the standard was fixed, and that there are enough free cycles in it to do all the inferences needed to do the right thing), and I'd move to ignore that second sentence. (In the meantime, I'll ignore all notices from sbcl, but I don't like doing that). --=20 __Pascal_Bourguignon__ http://www.informatimago.com/ ---------------------------------------------------------------------- Do not adjust your mind, there is a fault in reality. |