Adding UNION/MAP -- Feedback and tips pls!

N.M. Maclaren nmm1@cam.ac.uk
Mon Mar 4 18:13:00 GMT 2013


On Mar 4 2013, Russell Brennan wrote:

>> There are good reasons for Fortran not standardising unions and going
>> for CLASS(*) - unchecked unions are incompatible with strong typing.
>> My vague recollection is that DEC UNION is unchecked, and it certainly
>> allows the preservation of overlaid data, which is equally horrible.
>
>Forgive my ignorance, what is an unchecked union?  Also, what do you
>mean by preservation of overlaid data?

One where you can assign one member of the union and read another.

Er, have you seen the specification of DEC UNION?  I suggest getting
hold of a copy before implementing it!  It's better to read it than
for me to play Chinese whispers.

>> Unless people start to use it for new code :-(
>
>I feel that the extension is obscure enough that people who don't
>already use it would not choose to pick it up, unless they really
>needed to.  In that case, it would probably be a boon to them!

I disagree.  It's a loathesome feature from the point of view of software
engineering.  I want it rejected with maximum prejudice, even if other
more civilised GNU extensions are enabled.


Regards,
Nick Maclaren.



More information about the Fortran mailing list