Print

Print


Thanks to Alvaro Fernandez <[log in to unmask]> for contributing to the
discussion concerning the J3 paper 00-197.  He wrote:

> I only wish that instead of being called submodules, we would just allow
> modules to be nested, with appropriate scoping rules.

Unfortunately, nesting modules does nothing to support the separation of
interface from implementation.  Unnecessary compilation cascades result
from changes in the implementation that have no effect on the interface.

Anthony Stone has pointed out how he avoids compilation cascades,
by comparing .mod files after a compilation.  If one inserts a
dependency of the .mod file on the .f90 file, however, the .mod
file is eternally out-of-date with respect to the .f90 file, or at
least until a change is made in the interface.  And, of course, the
stragegy doesn't work if the module's interface information is in
the .o file.

In addition to avoiding compilation cascades, there are other reasons
to desire to separate interface from implementation, as outlined in the
paper.

This is not new and untried technology.  Both Modula and Ada prescribe
that interface and implementation are separately compilable units.

Best regards,
Van Snyder






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%