In Julia, the following code is ideomatic:
module A
include("A.jl")
end
while
module A end
A.include("A.jl")
is not. I 100% agree that the first option is more idiomatic, aesthetic, readable and should be preferred.
My question is, are there any technical advantages of the idiomatic way? Will the compiler or Revise perform better, or something like this?
The reason I ask is that I would like to mirror a module structure from protobuf, which supports “open modules”. The most faithful translation to Julia would be
module A end
module B end
A.incluce("A1.jl")
B.include("B.jl") # depends on what is in A1.jl
A.include("A2.jl") # depends on what is in B.jl
I wonder if there are technical issues with this.