Does importing a submodule do anything?

tictaccat
Fri, 02 Sep 2022 14:07:37 +0000
General Usage

The following codes do the same thing:

module A
    x = 3
end
@show A.x # 3

and

module A
    x = 3
end
import .A
@show A.x # 3

Does import .A do anything at all in the second example? If not, why is it allowed?

6 posts - 4 participants