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

Issue: ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS



ARRAY-TYPE-ELEMENT-TYPE-SEMANTICS:UNIFY-UPGRADING seems like the
beginning of a reasonable proposal.  There are a few problems with it:

You don't list what type specifiers it applies to.  I assume you mean
to include SIMPLE-ARRAY and VECTOR in addition to ARRAY.  What about
COMPLEX?

Your proposal assumes without stating it explicitly that

  (array-element-type (make-array dimensions :element-type element-type
					     options...))

is independent of the values of dimensions and options.  I believe this
to be true of most implementations, but see nothing in CLtL that requires
it.  I can easily imagine an implementation that offers more specialized
arrays of rank 1 than of other ranks, more specialized adjustable than
non-adjustable arrays, or size-dependent specializations (why bother with
packed formats for very small arrays?).  This could seriously impact the
adoption cost.  I think I have mentioned this before; do I have to drag
out all the other comments I made last time this issue came up?

You should specify more clearly that you are incompatibly changing the
meaning of (typep array '(array <element-type>)) from "(aref array i)
is guaranteed to result in an object of type <element-type>" to "(setf
(aref array i) x) is type-valid if and only if x is of type
<element-type>."

I don't understand the justification for introducing the function
UPGRADE-ARRAY-ELEMENT-TYPE.  There are plenty of other type operators
missing from Common Lisp, why put in just this one?

In the discussion section, "In short, no one would not want to 
gain portability at the expense of limiting the language to the architectural
features of the hardware on which it was first implemented." does
not say what I think you meant it to say, unless you've suddenly
changed your views radically.  Take out a "not."

The proposal is much too long and contains too many digressions.  It
should be extensively pared down before it is presented to X3J13.  You
can judge from my 1-week delay in response how difficult I found it to
read all the way through this proposal.  I haven't noticed any other
responses, so others may have found it very difficult also.