# Should I put using statements in files to be included?

**URL:** <https://discourse.julialang.org/t/should-i-put-using-statements-in-files-to-be-included/79896>\
**Category:** New to Julia\
**Tags:** packages\
**Created:** [April 23, 2022, 3:02pm UTC](https://discourse.julialang.org/t/should-i-put-using-statements-in-files-to-be-included/79896 "2022-04-23T15:02:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultrapoci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ultrapoci/32/25356_2.png) [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Post date:** [April 23, 2022, 3:02pm UTC](https://discourse.julialang.org/t/should-i-put-using-statements-in-files-to-be-included/79896/1 "2022-04-23T15:02:14Z")

</div>

I’m currently developing a module, and I’m splitting the code into various files that will be then included into the main file that declares the module. At the moment, I’m putting all `using` statements in every single file, `using` the packages that a file needs. Is this wrong? This shouldn’t add any overhead, and it’s useful to test a single file by simply running it in the REPL (which is a handy shortcut on VSCode). On the other hand, there’s a lot of repetition: for example, basically every single file has `using LinearAlgebra` on top. Is there some kind of convention about this? Should I put `using` statements all on top of the main file before including the other files?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [April 23, 2022, 3:23pm UTC](https://discourse.julialang.org/t/should-i-put-using-statements-in-files-to-be-included/79896/2 "2022-04-23T15:23:16Z")

</div>

No, you don’t need to do this.

My advice: Just let everything share the same namespace. It should be

```julia
module MyModule
    using LinearAlgebra 

    include("file1.jl") # No using statements in here
    include("file2.jl") # No using statements in here either
end

```
