(j3.2006) derived types with type parameters are different

Robert Corbett Robert.Corbett
Wed Jul 30 19:35:59 EDT 2008

Lawrie Schonfelder wrote:
>>From memory, getting increasingly fallible these days (:-(, SEQUENCE for parameterised types was
> justified on grounds that you might need to force a storage order to facilitate some optimisation
> and some interlanguage programming.
> The first time the question of equivalence of types was considered the proposal was that two
> separate type definitions were equivalent if and only if they were lexically identical. This was
> considered too restrictive. The first relaxation was to allow parameter names to be different but
> maintaining lexical identity for the parameter expressions. This too was rejected and the current
> expression equivalence rule invented. It was claimed that this form of equivalence was already a
> feature of determining the characteristics of a procedure interface, so it was no big deal.

Whoever claimed that missed a couple of important points.
Ensuring that the characteristics of a procedure interface
match the characteristics of the corresponding procedure
is the programmer's responsibility.  A processor is not
required to ensure that they are equivalent.  The other
point is that the characteristics of a procedure are, in
general, dynamic properties, while type equivalence, at
least until Fortran 2003, has been a static property.

Bob Corbett

More information about the J3 mailing list