[J3] sequence type equality
Robert Corbett
rpcorbett at att.net
Thu Oct 15 09:24:40 EDT 2020
I understand that you want to drop sequence types.
I do not understand how you want BIND(C) to work.The Fortran standards of this century say thatsequence types and BIND(C) types use the same rulesto determine type equivalence. You appear to besaying that BIND(C) types should use the same rulesas nonsequence types to determine type equivalence,viz. two types are equivalent if and only if theyare defined by the same type definition.
I agree that if sequence types are dropped and thetype equivalence rules are changed, the language willbe simpler. New compilers could avoid the nastinessof implementing the type equivalence algorithm,which is difficult to get right.
The possibility of changing the way types work posesa problem for fixing the specification of pureprocedures. The constraints needed for pureprocedures are simpler if the type equivalence rulesare reduced to the rules for nonsequence types.However, dropping sequence types might be too big achange for an interp.
Robert Corbett
On Thursday, October 15, 2020, 5:22:11 AM PDT, Bill Long via J3 <j3 at mailman.j3-fortran.org> wrote:
BIND(C) types solve the problem of interacting with C. Modules solve he problem of “same type as”. COMMON is obsolescent and better replaced by modules. I don’t see any ue for SEQEUNCE types any more, except that really old codes might have them (as well as arithmetic IF and a lot of other ancient junk). Is there any use for SEQUENCE that does not already have a batter alternative?
> On Oct 15, 2020, at 1:00 AM, Robert Corbett via J3 <j3 at mailman.j3-fortran.org> wrote:
>
> Note that BIND(C) types have
> almost all of the same issues
> as sequence types and a few
> extra besides. There will be
> very little benefit from
> eliminating sequence types
> unless BIND(C) types are also
> eliminated.
>
> Bob Corbett
>
> On Oct 14, 2020, at 10:48 PM, Damian Rouson via J3 <j3 at mailman.j3-fortran.org> wrote:
>
>>
>>
>> On Wed, Oct 14, 2020 at 1:27 PM Bill Long via J3 <j3 at mailman.j3-fortran.org> wrote:
>>
>> Relevance: Since the advent of modules 3 decades ago, I’ve never se use of, or relevance of SEQUENCE types.
>>
>> Mystery: Why is SEQUENCE not in the Obsolescent list?
>>
>> I'm curious about this too. Currently, obsolescent features are features for which better methods existed in a previous standard. If a feature has limited utility, however, it's unlikely that a better method would ever be developed so we might need to expand how we describe the nature of obsolescence.
>>
>> Like Bill, I have never seen SEQUENCE in use other than in compiler documentation or textbooks. I find descriptions online of two use cases (see http://k2.chem.uh.edu/F95_Reference.pdf):
>>
>> 1. Argument association of equivalent types, and
>> 2. Sequence association in COMMON blocks.
>>
>> Use case 1 seems similar to EQUIVALENCE, which is obsolescent. Use case 2 is also obsolescent. Unless I'm misreading or "misunderestimating" the uses, I think there's a strong case to be made for classifying SEQUENCE as obsolescent.
>>
>> Damian
>>
Bill Long longb at hpe.com
Engineer/Master , Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Hewlett Packard Enterprise/ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20201015/d566f57c/attachment.htm>
More information about the J3
mailing list