# Implicitly loaded modules in the future?

**URL:** <https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646>\
**Category:** Internals & Design\
**Tags:** question, module, code-organization\
**Created:** [June 9, 2021, 8:58pm UTC](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646 "2021-06-09T20:58:00Z")\
**Posts on this page:** 1\
**Showing post:** 56

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [June 10, 2021, 4:33pm UTC](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646/56 "2021-06-10T16:33:59Z")

</div>

> [@patrick-kidger](#):
>
> So the “in which order” is really the bit where things go wrong here. I find it much (much) better to express code as DAG rather than linearly. DAGs are `O(log n)` in depth and avoid manual topological sorting, for example.

That’s nice, but that does mean the final ordering in which the code is actually loaded is implicit. So I agree “moreover anything implicit is just an easy source of bugs, really”, which is the worrisome issue for having it all worked out implicitly by a resolver on a DAG. `include` forces you to choose an order. That orders makes all things well-defined: that order makes you able to know what any values of overridden globals would be.

The other method can mean if you do `Main.a = i` in modules `A_i`, the internals of the DAG can choose to order forward, reverse, or not sort at all, and those can all change the value of `a == 2` in the user’s REPL. It can change when you change the version of Julia, because that could potentially change the heuristics of the resolver. It can change when you change the file name. That by definition is spooky action at a distance.

That’s not to say it’s any worse, there’s definitely some benefits to having all of that implicit. But it’s implicit.

---

_[View the full topic](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646)._
