From: sds on
On Aug 3, 4:44 am, Barry Margolin <bar...(a)alum.mit.edu> wrote:
> I believe that specifying the array element type is equivalent to a
> declaration of the type of any expression that accesses an element of
> the array.

If this were the case, then why does the standard provide UPGRADED-
ARRAY-ELEMENT-TYPE?
Given that FFIs often pass the underlying array memory ranges to the C
libraries as is,
I think the intent was to actually specify (or, at least, affect) the
internal
storage of the array.

However, I see your point.
Thanks.
Sam.
From: Barry Margolin on
In article
<c11018c9-dad6-4041-9536-f7aa7e9657e6(a)i24g2000yqa.googlegroups.com>,
sds <sam.steingold(a)gmail.com> wrote:

> On Aug 3, 4:44�am, Barry Margolin <bar...(a)alum.mit.edu> wrote:
> > I believe that specifying the array element type is equivalent to a
> > declaration of the type of any expression that accesses an element of
> > the array.
>
> If this were the case, then why does the standard provide UPGRADED-
> ARRAY-ELEMENT-TYPE?

Good point, I forgot about that. So it's actually equivalent to
declaring the type as the upgraded type, not the specified type.

> Given that FFIs often pass the underlying array memory ranges to the C
> libraries as is,
> I think the intent was to actually specify (or, at least, affect) the
> internal
> storage of the array.

Yes, but it can only use a specialize storage mechanism because you've
promised not to try to store any other type.

UPGRADED-ARRAY-ELEMENT-TYPE is basically just a recognition that
implementations don't really have specialized storage for all types, so
it provides an introspection mechanism to find out whether your desired
type actually does.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***