# Does importing a module load all methods defined in that module?

**URL:** <https://discourse.julialang.org/t/does-importing-a-module-load-all-methods-defined-in-that-module/94010>\
**Category:** New to Julia\
**Created:** [February 3, 2023, 8:05pm UTC](https://discourse.julialang.org/t/does-importing-a-module-load-all-methods-defined-in-that-module/94010 "2023-02-03T20:05:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![goerz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerz/32/3269_2.png) [@goerz](https://discourse.julialang.org/u/goerz)\
**Post date:** [February 3, 2023, 8:05pm UTC](https://discourse.julialang.org/t/does-importing-a-module-load-all-methods-defined-in-that-module/94010/1 "2023-02-03T20:05:39Z")

</div>

This is just to confirm my understanding.

Based on Julia’s behavior, the following statement seems to be true: _Any_ `import` or `using` statement [loads](https://docs.julialang.org/en/v1/manual/code-loading/) a module, and loading adds _all_ methods defined in that module to their respective method tables.

So, if I do `import SomeModule` or `using SomeModule: some_function`, if `SomeModule` defines any methods for some other function (let’s say `LinearAlgebra.mul!`), the updated method for `LinearAlgebra.mul!` will be loaded into my program as well. There is no way to use/import anything from `SomeModule` without getting the updated `LinearAlgebra.mul!` method, short of [manually manipulating method tables](https://discourse.julialang.org/t/deleting-methods-in-julia/13455/6), right? (Of course, I won’t notice any of this unless I import `LinearAlgebra.mul!` in my own program).

Just to be clear: I’m totally fine with this behavior, and I kinda think it’s the only behavior that really makes sense, but it took me a while to wrap my head around when originally learning Julia. Still, I haven’t seen it _explicitly_ stated in the documentation.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [February 3, 2023, 8:58pm UTC](https://discourse.julialang.org/t/does-importing-a-module-load-all-methods-defined-in-that-module/94010/2 "2023-02-03T20:58:04Z")

</div>

Yes, that’s exactly correct. (And yes, I know _you’re_ not new to Julia but this sort of information will be helpful in #first-steps :))
