# Using "Module.jl" as alias to include("Module.jl"); using .Module

**URL:** <https://discourse.julialang.org/t/using-module-jl-as-alias-to-include-module-jl-using-module/52610>\
**Category:** Internals & Design\
**Created:** [December 30, 2020, 12:29pm UTC](https://discourse.julialang.org/t/using-module-jl-as-alias-to-include-module-jl-using-module/52610 "2020-12-30T12:29:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [December 30, 2020, 12:54pm UTC](https://discourse.julialang.org/t/using-module-jl-as-alias-to-include-module-jl-using-module/52610/2 "2020-12-30T12:54:21Z")

</div>

There is already an issue with a suggestion like this, see

> <https://github.com/JuliaLang/julia/issues/4600>
>
> When I do
> 
> \`\`\` julia
> \# Main.jl
> module Main
> using .Foo
> end
> \`\`\`
> 
> and there's a f…ile called \`Foo.jl\` in the same directory as \`Main.jl\` it should be loaded. I suspect that relative \`using\` should also \_not\_ look in the global require places – i.e. \`Pkg.dir()\` and then \`LOAD\_PATH\`. The same applies to \`import\`.

and

> [@\[ANN\] PatModules.jl: a better module system for Julia](https://discourse.julialang.org/t/ann-patmodules-jl-a-better-module-system-for-julia/52226/63):
>
> The issue is not double inclusion, but the inclusion order. This can cause a lot mental burden and should be handled by the compiler since the compiler knows which module depends on which, e.g when you have include("B.jl") include("A.jl") where module B depends on A, manual include will result in undefined error, but if we implement issue 4600, then we can just write something like (the syntax is not decided yet) using .B from "B.jl" using .A from "A.jl" or using .A from "A.jl" using .B fr…

---

_[View the full topic](https://discourse.julialang.org/t/using-module-jl-as-alias-to-include-module-jl-using-module/52610)._
