private components in module files

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Oct 23 17:45:00 GMT 2019


On Wed, Oct 23, 2019 at 07:26:46PM +0200, Tobias Burnus wrote:
> Hi Steve,
> 
> On 10/23/19 6:49 PM, Steve Kargl wrote:
> >> name.mod and name.smod, which also looks like a waste
> >> of space. But I don't know anything about the implementation.
> >>

(correction to poor English inserted into my original reply :)

> > A major point of submodules is to avoid compilation cascades.
> > Consider a project with numerous source files that USE a params
> > module.  Prior to submodules, a change to the params module
> > would require a recompilation of those numerous files.  With
> > submodules, you compile/create the *.mod once with interface
> > information.  The *.smod file contains the implementation
> > details, and can be recompiled multiple time without causing
> > the cascade.
> 
> Still, it is not clear to me why for the out-most module, both a .mod 
> and a .smod is needed – if the content is completely identical (as it 
> can happen for some examples at least). – I would understand it if the 
> content was always different or if only a .mod would be present for that 
> one – and only .smod for the rest.
> 

Probably, need to poke pault about implementation details.  I
suspect it came down to a matter of available time to work on
the submodule feature and what worked at the time.  I suspect
pault would not object to anyone refining the implementation.

-- 
Steve



More information about the Fortran mailing list