# Proper way of organizing code into subpackages

**URL:** <https://discourse.julialang.org/t/proper-way-of-organizing-code-into-subpackages/52835>\
**Category:** New to Julia\
**Tags:** packages, code-organization\
**Created:** [January 4, 2021, 5:34pm UTC](https://discourse.julialang.org/t/proper-way-of-organizing-code-into-subpackages/52835 "2021-01-04T17:34:30Z")\
**Posts on this page:** 1\
**Showing post:** 42

<div class="post-metadata">

**Author:** ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Post date:** [August 22, 2022, 8:37pm UTC](https://discourse.julialang.org/t/proper-way-of-organizing-code-into-subpackages/52835/42 "2022-08-22T20:37:18Z")

</div>

> [@patrick-kidger](#):
>
> Adding methods to a function defined somewhere else is _mutating global state_, and this is a Bad Thing.
> 
> If I could, I would have this be prohibited by the compiler.

Are you proposing that the compiler disallow multiple dispatch?

> [@patrick-kidger](#):
>
> It is completely possible to use Python-style `from pkg import foo`, as the success of [FromFile](https://github.com/Roger-luo/FromFile.jl) has demonstrated.

Unfortunately, I don’t think FromFile really achieves the dependency management that you want it to achieve. I’m away from my computer, so I’ll just link to two old comments, [here](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646/265) and [here](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646/266), that explain why I think `@from` doesn’t provide real dependency management.

---

_[View the full topic](https://discourse.julialang.org/t/proper-way-of-organizing-code-into-subpackages/52835)._
