I was wondering if Fortran could have an experimental standard, similar to the C++ experimental std. The experimental standard would include the features not yet voted into the official standard. The experimental standard would need fewer votes from the standard committee members to include a new feature and have a shorter turnaround time. The experimental standard can be a testing ground for new features and also benefit those longing for modern programming features.
1 Like
Please see this:
opened 06:05AM - 06 Apr 21 UTC
Motivation
-----------
`Forall` and `do concurrent` are commonly assumed to … offer the potential for better performance than `do` loops, but both were ultimately found to have design problems that preclude important optimizations, notably parallelization, in important use cases. Fortran 2018 declares `forall` obsolescent but attempts to improve upon `do concurrent` despite known [standard-conforming use cases] that a compiler cannot safely, or even in principle, parallelize. A [proposal] was submitted to J3 to address `do concurrent` parallelization, but the committee did not adopt the proposal, presumably because the proposal [changes the semantics] of existing, standard-conforming code.
The value that the committee places on not breaking existing codes makes a replacement feature attractive. The problems found in `forall` and `do concurrent` suggest anticipating the likelihood that any replacement will need future revisions to ensure the desired aim even if those revisions break existing code.
Proposal
---------
Annex B of the Fortran 2018 standard lists the first two categories of features enumerated below. I propose to add the third:
1. **Deleted** features were "redundant and considered largely unused in Fortran 90 or 2008."
2. **Obsolescent** features are those which "were redundant and for which better methods were available in Fortran 90."
3. **Experimental** features could change in a future standard in ways that are incompatible with the current standard.
Experimental features that survive 2 or 3 standards without incompatible changes could be removed from the list of experimental features.
Use Case
----------
An experimental new feature designed to be very similar to `do concurrent` but with parallelizable semantics could minimize the work of the committee, the compiler developers, and the user community wishing to refactor codes to leverage the new feature. Most importantly, with users forewarned, the committee could update experimental features in subsequent standards even if the updates break existing code.
[standard-conforming use cases]: https://github.com/llvm/llvm-project/blob/main/flang/docs/DoConcurrent.md
[proposal]: https://j3-fortran.org/doc/year/19/19-134.txt
[changes the semantics]: https://mailman.j3-fortran.org/pipermail/j3/2020-July/012244.html
I have posted my own thoughts on that Fortran proposals thread.
4 Likes