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

Issue: DECLARE-ARRAY-TYPE-ELEMENT-REFERENCES (Version 2)



    Date: Fri, 13 Jan 89 10:49:25 EST
    From: Dan L. Pierson <pierson@mist.encore.com>

    ...
    Problem description:

    Array type specifiers appear to be useful both for declaring the
    storage format of the array and for declaring the types of legal
    operations on array elements.  Unfortunately, the current definition
    of the meaning of array type specifiers does not require an
    implementation to support the second use.

It doesn't require them to support the first use, either. After all,
it's optional to support type declarations in the first place.
As such, this isn't an appropriate problem description. I'll suggest
the following wording, which I think doesn't distort your purpose,
and which gets around the issue of whether type declarations are supported:

 In principle, array type specifiers could be used both for declaring
 the storage format of the array and for implicitly declaring the types
 of the elements held by those arrays. Unfortunately, the current 
 definition of the meaning of array type specifiers does not explicitly
 specify that the latter use of these declarations is legitimate.

This in itself would not be enough reason to rewrite the proposal since
at this point, I don't really much care about problem descriptions or
any of that other junk, as long as the proposal part is right. However,
since below I suggest you should change the proposal part, you might as
well catch this at the same time.

    Proposal (DECLARE-ARRAY-TYPE-ELEMENT-REFERENCES:RESTRICTIVE):
    
    Within the scope of an array type declaration, all references to array
    elements are assumed to satisfy the exact declared element type.  It
    is an error if this is ever violated.  A compiler may treat the code
    within the scope of the array type declaration as if each access of an
    array element was surrounded by an appropriate THE form.
    
After all the fuss on DECLARE-TYPE-FREE, it's unreasonable to expect to
get away with a vague term like "scope". You must say "dynamic scope" or
"lexical scope". From the surrounding text, it seems clear to me that you
intended "lexical scope" but you should definitely spell it out.

If you write "lexical scope", you can add to the rationale that you are
consistent with SYMBOL-MACROLET-DECLARE:ALLOW and DECLARATION-SCOPE:LEXICAL.
You can also then add me to the discussion as a supporter.

If you write "dyanamic scope", you can add to the rationale that you are
consistent with DECLARATION-SCOPE:ALLOW (and you can mention that you are
gratuitously incompatible with SYMBOL-MACROLET-DECLARE:ALLOW if you like...)
You can also then add me to the discussion as firmly opposed.