Why does every module contain a link to Main in the REPL?

julia> module foo end
Main.foo

julia> foo.Main
Main

julia> foo.Main.foo.Main.foo === foo
true

julia> x = 4
4

julia> Main.x
4

julia> foo.Main.x
4

Not quite sure why foo contains Main?

Does it “contain” Main or one would say that we can access the variables of Main using Main.x from inside Foo?

1 Like