# 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:** 266

<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: [June 24, 2021, 5:45am UTC](https://discourse.julialang.org/t/implicitly-loaded-modules-in-the-future/62646/266 "2021-06-24T05:45:35Z")

</div>

Here’s another example that demonstrates the vacuity of a system like `FromFile.jl`. Suppose we start with this:

```julia
# A.jl
function foo end

# B.jl
@from "A.jl" import foo
bar(::Int) = 1
foo(x) = bar(x) 

```

Ok, great, now we know that file `B.jl` only depends on file `A.jl`. But suppose we add another file like this:

```julia
# C.jl
@from "B.jl" import bar
bar(::Float64) = 2 

```

The new package with the addition of the `C.jl` file will load and run just fine. But now the behavior of `foo` is different, because we’ve overloaded `bar`. File `B.jl` asserts that its contents, including `foo`, only depend on file `A.jl`, but that is wrong! In fact, the behavior of `foo` now also depends on file `C.jl`, even though there is no `@from "C.jl"` statement at the top of `B.jl`.

To summarize:

- The `@from` dependencies listed at the top of a file are _incomplete_.
- Modules do not isolate dependencies in a language where every function has a global method table.

---

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