On Tue, Aug 1, 2017 at 7:44 PM, Steve Lionel wrote:
>.. not the least reason for which is that it would make
> CHARACTER(10) not the same dynamic type as CHARACTER(20), which would be
> chaos for the language...
Steve,
You use the phrase "same dynamic type as": for all those Fortranners
out there coding "in anger" with the language, what better way exists
than to research the "same dynamic type as" question with the
SAME_TYPE_AS intrinsic?
Considering what the text has for this intrinsic, "If neither A nor B
has extensible dynamic type, the result is processor dependent.", the
standard is saying it does not have a clear position on whether
CHARACTER(10) is or is not the same dynamic type as CHARACTER(20),
that it will defer the decision to the processor, right? That Intel
Fortran can and will return T for such an inquiry, but it will be
completely alright for some other processor to return F for the same,
correct? Is that then not a situation of "chaos" you would like to
address pronto?
But let us place SAME_TYPE_AS aside for a moment, other than a couple
of situations involving the SELECT TYPE block construct or PDTs where
one or both of the most useful words in English - "except" and "but" -
with suitable use of another definition in the Fortran standard,
"deferred type parameters", can be employed to leave the semantics the
same as present and prevent any further "chaos". But if you think
otherwise, can you construct a code example to illustrate the problem
along with an assertion no refinement to the language text will retain
current semantics of that situation? Please note I'm asking in
earnest, for I'm trying to "break" my own suggestion too and have not
succeeded yet. With words one can present any change as ominous, an
impending doom, I'm hoping it can be addressed more objectively than
that.
Also, note I'm not implying the change I proposed be fast-tracked
against all procedure for any immediate standard revision or any such
thing. I'm only suggesting interested readers work through the
standard text and check "why not" with this change in a thought
exercise and ask is it really as a big change as you have indicated
prima facie.
Re: "There are quite a few places in the language where you have to
grok the entire standard" , hopefully you will appreciate I've made an
attempt to "grok" the entire standard with "dynamic type". And re: "I
know that I've made similar errors ..", it should only be an
indication the Fortran standard can always be improved! "dynamic
type" seems like a good case for it!
Thanks,
Vipul
|