(j3.2006) derived types with type parameters are different
Mon Jul 28 21:40:28 EDT 2008
Bill Long wrote:
> Robert Corbett wrote:
>> After spending more time than I should have searching for a good
>> solution to this problem, I have concluded that there are no good
>> solutions. I have decided that the best fix for the problem is
>> to ban sequence types with type parameters from standard-conforming
>> programs. Given the permissive nature of the Fortran standard,
>> vendors who currently implement sequence types with type parameters
>> could continue to support them unchanged.
> I'm not sure what is being proposed here. Is it
> 1) An Interp for Fortran 2003 along the lines of "you guys really didn't
> intend to allow this; it is certainly a mistake in the standard..." or
> 2) A comment for Fortran 2008 that we should make an incompatible change
> that removes this capability.
>> Most of the solutions I considered would require large changes to
>> the standard,
> I would not consider something that requires large changes to the
> standard to be a "solution".
>> would impose a large burden on implementors,
> "did impose" for those who already did this, "would impose" for the rest.
>> would be hard for users to understand.
> As compared to, for example, finalizers ?
>> Simple solutions, such as
>> considering all derived type definitions with type parameters to
>> define different types, would almost certainly break all
>> existing implementations of parameterized sequence types. Given
>> that parameterized sequence types add negligible functionality to
>> the language, why bother?
> I think the time for that argument was about 6 years ago.
The feature is ill-defined. No good solutions to the problem of
defining when two parameterized sequence types are equivalent
have been offered. The feature is hardly in heavy use today.
The work required to fix the standard and the implementations
exceeds any possible benefit from retaining it. Yes, I am
arguing for the committee to drop the feature before it gets into
I would like to see how you would modify the standard to specify
what it means for two parameterized sequence types to be equal.
More information about the J3