Please note I am not in any way trying to convey any of the use cases mentioned here - heterogeneous lists, error handling, etc. - are not useful. To the contrary, I have not long asserted such needs are crucial to the larger application of Fortran in scientific and technical computing.
Instead of usefulness, I am trying to understand and in the process, posing a question as a challenge to get to the bottom of the need for polymorphic arguments with INTENT(OUT) attribute in a PURE subroutine.
Look, I completely the understand the inclination to author library procedures that are all SIMPLE and ELEMENTAL (with, say, array computing taken as the hallmark of Fortran); if that is not viable, then ELEMENTAL which implies also PURE; and short of that, PURE subprograms.
But the Fortran ecosystem is not playing all; there are too many resource constraints and the chain is only as strong as its weakest link (the compiler vendor that seeks to do the least with standard extensions).
The result is a certain adhocism with what gets in to a standard revision and what doesn’t - it seems to depend on who is asking for what and how so. This is not good. A vision that addresses “For whom Fortran, for what” and which might then imply a “wider tent” of practitioners whose needs are considered and then working toward a coordinated set of actions that enhance the language standard toward a broader application in all aspects of scientific and technical computing appears lacking.
A tacitly held position which could be noticed, especially among the vendors, thru’ Fortran 2023 and leading up to Fortran 202Y is a considerable lack of enthusiasm for features / improvements that are not in the performance-sensitive aspects of computing and also, if there are alternatives to any requests. One can see it in the responses by subgroup chairs to proposals for Fortran 202Y. I am disappointed with that position.
Considerable heterogeneous lists: the Fortran 2003 standard mostly started to support them and Fortran 2008 and to an extent, 2018 revisions tied up some loose ends. The gap as noted here with polymorphic arguments with INTENT(OUT) in a PURE subroutine. So yes, that can be fixed if that makes it to the top of things-to-do. I am trying to get to whether this should have identified and enumerated reasons that would assign it a priority and thus move up the list, as opposed to gut-feel / adhocism.