Ada and Modern Fortran

Regarding ONCE-type enumerators using current Fortran programming environments, might want to look at Immutable declaration - #14 by wclodius

As regards test suites, I have seen many discussions of that, including why the standards committee and the vendors (which have test suites) and the many tests derived from bug reports have not been combined and why commercial vendors would hesitate to use one, even including the gfortran tests, which are Open Source. How lawyers keep coming up in a discussion about a Fortran test suite is almost comical. Perhaps a joint project just between Open Source compilers, which currently probably need it more is feasible.

I think a simple beginning might be to extend the intrinsics descriptions project on fortran-lang
to include tests of the intrinsics, as some implementations are sub-optimal. It might expand interest in the descriptions, be a seed of a conformance test, and help Fortran implementations to provide robust intrinsics. SUM() is a simple example that has been discussed on this forum, where some implementations are just a straight-forward addition of the values.

There are a lot of Ada+PL/I+Matlab (which was doing what Fortran should have been doing for quite a while) features I would like to see; but I will not be holding my breath. PL/I has some good features too. There are things to learn from the history as well as the features from Ada (and PL/I); but you would get at least three camps with very different opinions that could each fill a book with their versions, so I would not even attempt it here.

1 Like