# What is the preferred way to use multiple files?

**URL:** <https://discourse.julialang.org/t/what-is-the-preferred-way-to-use-multiple-files/30687>\
**Category:** General Usage\
**Tags:** question, modules, code-organization\
**Created:** [November 4, 2019, 8:35am UTC](https://discourse.julialang.org/t/what-is-the-preferred-way-to-use-multiple-files/30687 "2019-11-04T08:35:07Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![JonasIsensee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasisensee/32/4704_2.png) [@JonasIsensee](https://discourse.julialang.org/u/JonasIsensee)\
**Post date:** [November 4, 2019, 9:17am UTC](https://discourse.julialang.org/t/what-is-the-preferred-way-to-use-multiple-files/30687/6 "2019-11-04T09:17:04Z")

</div>

Alternatively remove the `include` statement from `functions.jl`  
and only include `structs.jl` from main.

That depends a little bit on your desired program structure.  
Do you want doubly nested modules by making `structs` a submodule of `functions` which itself lives in `main`?

Alternatively both `functions` and `structs` could live in `main` directly.

Note however that all these modules are not necessary at all in your case here. In particular your `main` module does not seem to serve an purpose.

---

_[View the full topic](https://discourse.julialang.org/t/what-is-the-preferred-way-to-use-multiple-files/30687)._
