Say I’m writing a package
P, which contains two sub-modules
M2. Both submodules share some common codes, so I extract the common codes and wrap it in another sub module
I decide to split the codes into four files:
- the root module file P.jl
module P include("M1.jl") include("M2.jl") end
module M1 include("C.jl") ... end
module M2 include("C.jl") ... end
module C ... end
Then the topology of the package
And the content of C.jl appears two times in the final P.jl (?). Seems to be rather noisy.
Is there a better method to arrange the files?
Or is there any guides about how to arrange the files?