[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS
- To: Jon L White <edsel!jonl%labrea.stanford.edu@multimax>
- Subject: Re: Issue: ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS
- From: Dan L. Pierson <pierson%mist@multimax.ARPA>
- Date: Mon, 23 May 88 18:26:41 EDT
- Cc: cl-cleanup%sail.stanford.edu@multimax
- In-reply-to: Your message of Fri, 13 May 88 02:18:34 -0700. <8805130918.AA25649@bhopal.lucid.com>
Either I oppose both options or an additional proposal is needed. The
problem is that I want the following code to "work".
(DEFVAR MY-ARRAY (MAKE-ARRAY 20 :ELEMENT-TYPE '(SIGNED-BYTE 5)))
;;; Upgrade the storage of the above any way you want
(LET ((MY-ARRAY MY-ARRAY))
(DECLARE (TYPE (ARRAY (SIGNED-BYTE 5)) MY-ARRAY))
(SETF (AREF MY-ARRAY 10) 127)) ; This is an error. In fact it
; signals an error with the right
; optimization flags.
The SETF obviously conflicts with the local declaration and there is
no reason that even a fairly dumb compiler can't give an error without
reference to the type information that is associated with the global
definition of MY-ARRAY.
I don't think that this is covered by either "for declaration" or "for
discrimination" of the array. It is a local declaration covering
references to elements of the array; unfortunately our current
declaration terminology doesn't handle this distinction.