As a starting point for discussion (as I for one find deciding the criteria an important but difficult requirement to construct) …
What should the criteria be for placing a function into the fortran standard library or becoming an intrinsic should be ..
A new intrinsic should add a capability that cannot be done with
self-contained standard pure Fortran code. This not only includes
functionality but performance. That is, if an intrinsic implementation
significantly outperforms any standard Fortran implementation it should
be considered for inclusion.
If the procedure can be generated with standard Fortran it should first be
available in a public module with a liberal license. A vendor-supplied
version may be provided but it should conform to the behavior of the
public module.
A focus on high utility, reliability, modern standards compliance,
and avoiding duplication of existing compiler intrinsics is a basic
principle on what should be considered for candidacy as a standard-specified
feature.
Key target criteria include portability, purity (no side effects) unless side effects are a specific purpose of the procedure,
explicit interfaces, and comprehensive documentation should be part of candidates
To minimize bloat broad utility should be heavily weighted. The function
must solve a common problem faced by many Fortran developers (e.g.,
advanced math, string manipulation, input/output).
Modern Fortran Compliance: Code should adhere to modern standards
(Fortran 2008, 2018), utilizing modules, strong typing, and avoiding
obsolescent features like fixed-form format, common blocks, or go
to statements.
Purity and Safety: Functions should be PURE (not modifying arguments)
and side-effect-free, using intent(in) for arguments to ensure thread
safety and predictability.
Explicit Interfaces: Procedures must be placed within modules to
provide explicit interfaces, which prevents many common bugs.
Portability: The code must be portable across different compilers
(GNU, Intel, NVIDIA) without requiring specialized hardware or
compiler-specific hacks.
Documentation and Testing: New functions require clear documentation
and comprehensive unit tests to ensure long-term maintenance and
reliability.
General Best Practices to Follow for prototype modules:
All code should reside within modules.
Use subroutines if a procedure needs to modify its arguments,
keeping functions purely for returning values.
Naming should be clean and descriptive without unnecessary prefixes
that add length rather than clarity.
functions shouldn’t have side effects and be thread-safe unless an
obvious reason prevents it.
Reasonably follow common Coding practices:
Do not use fixed-form format, always use implicit none, ...
The standard committee should be responsible for designating modules
as intrinsics, required, or optional, but required to take into
consideration votes taken at least every three years on the need for
the functions by the user community; particularly votes on functionality
that creates a new fortran capability.
Ideally the optional packages should be available from an fpm(1)
package repository.
When possible, modules prototyping the desired new capabilities should be
provided as well using a similiar scheme but where the modules are allowed
to use ISO_C_BINDING to prototype the functionality.
The first procedures to standardize should be the ones commonly available as
extensions (POSIX file/system interfaces or their equivalents on non-POSIX
platforms are overdue (by thirty years or more :>), a basic graphics library).
Strongly related issues are the standard requiring a cpp-like pre-processor.