>
> A question for compiler writers: could transfer() be made more efficient,
so
> that people could reasonably stop using equivalence for generic data
> manipulation? Perhaps the call to transfer() could be analyzed by the
parser
> to prevent some of the inefficiencies? It sees a pity that there is a way
to
> do what we want in theory, but that doesn't work in practice. After all,
> transfer() was created to facilitate data management, wasn't it?
>
Yes. A study of the various uses of EQUIVALENCE around 1986 showed that
there remained one use that was not covered by new features in the then
draft of Fortran 8x, and TRANSFER was developed to fill the gap. It was
always thought of as being for 'advanced' users.
Regards,
Mike Metcalf
|