(j3.2006) derived types with type parameters are different
Tue Jul 29 19:14:20 EDT 2008
Andy Vaught wrote:
> On Tue, 29 Jul 2008, Aleksandar Donev wrote:
>> On Tuesday 29 July 2008 13:46, Michael Ingrassia wrote:
>>> If it causes significant loss of functionality, what exactly is the
>>> functionality that we lose?
>> I (and probably Lawrie andothers) agree, but there is the issue of backward
>> compatibility and simply not making "language design" changes
>> retroactively---only fixes of techical messups.
> You're worried about backwards compatibility on a feature that few
> compilers have implemented.
I think the issue here is the basic integrity of the standards process.
If we take the attitude that, 5 years after the fact, it's OK to remove
some intentionally included feature from the standard because vendor X
thinks it is a lot of work, then what level of confidence does any
vendor have in the stability of the standard? Are they supposed to
guess what is "real" and what is just "maybe"? Why would any vendors
take the standard seriously? At which point the whole purpose of the
standard is defeated.
> Surely, very few people are today depending
> on parametrized derived types
Surely at some point very few people depend on any new feature. Hardly
an argument for removal.
> and even fewer are further depending on the
> compiler to figure out that n+n is the same as 2*n in a sequence type.
I've though about the example case more, and I think the IBM compiler is
right. The issue with disambiguation is in comparing the types of the
dummy arguments, not the definitions of the types. The declarations of
the dummy arguments include a literal constant (2) for the value of N,
so in both cases it is clear that the array declaration is A(4). Two
compilers not agreeing is no cause for a national emergency. We can fix
our compiler. And thank Bob for the new test case.
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3