# Submodules discouraged?

**URL:** <https://discourse.julialang.org/t/submodules-discouraged/38190>\
**Category:** General Usage\
**Created:** [April 25, 2020, 12:44pm UTC](https://discourse.julialang.org/t/submodules-discouraged/38190 "2020-04-25T12:44:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![evanfields](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evanfields/32/1744_2.png) [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Post date:** [April 25, 2020, 12:44pm UTC](https://discourse.julialang.org/t/submodules-discouraged/38190/1 "2020-04-25T12:44:13Z")

</div>

I think I’ve heard on Discourse and Slack that using submodules as internal helper modules for code organization is discouraged, tends to cause more problems than it solves, etc. This seems quite surprising to me.

Is it actually the case that submodules are discouraged? If so, why? If not, is there a related notion floating around (some other use of modules which is supported but the community has moved away from) that I might be confusing?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [April 25, 2020, 12:47pm UTC](https://discourse.julialang.org/t/submodules-discouraged/38190/2 "2020-04-25T12:47:09Z")

</div>

Submodules are fine, there’s certainly no recommendation against them.

---

<div class="post-metadata">

**Author:** ![Zach\_Christensen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zach_christensen/32/7220_2.png) [@Zach\_Christensen](https://discourse.julialang.org/u/Zach_Christensen)\
**Post date:** [April 25, 2020, 1:05pm UTC](https://discourse.julialang.org/t/submodules-discouraged/38190/3 "2020-04-25T13:05:25Z")

</div>

My personal preference is to create submodules as a way of making code independent from everything else so if the package gets big enough its simple to create separate packages.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 25, 2020, 1:06pm UTC](https://discourse.julialang.org/t/submodules-discouraged/38190/4 "2020-04-25T13:06:11Z")

</div>

> [@evanfields](#):
>
> If not, is there a related notion floating around (some other use of modules which is supported but the community has moved away from) that I might be confusing?

I would say that submodules are fine, and make most sense when

1. the codebase is complex (think at least 2k LOC in most cases, but some much larger projects have no submodules),

2. the modules can be organized into smaller parts in a meaningful way that provides some benefits (cleaner API),

3. but it’s not sensible to split code into separate packages.
