Description
The idea is pretty simple: Allow marking public module functions/subroutines with a keyword such as 'inline' or 'export'. This requires the compiler to place the implementation, and not just the interface of the subroutine in the binary module file. Modules that use this 'inlined' module will be able to see the implementation of the subroutine and potentially inline it. The decision to inline or not is left up to the compiler.
This would replace many uses of #include for performance reasons, and would have the greatest benefits for small functions where the function call overhead is comparable to the actual work of the function.
This would give us the benefits of modules, while still allowing an important optimization that fortran currently misses, and removing a preprocessor peril.
You could argue that Link-Time Optimization has already made this idea obsolete, but I'm not convinced LTO has become ubiquitous?
Thoughts?