Question about scope and namespace: how do modules find each others?

Hi all,
I am new to Elixir and I am still in the process to build a mental model that works given my background (oop, python).
So I understand that the module name and the files name do not really matter. Does that mean after compilation all modules live in the same namespace? Where can I read more about that?

You are all amazing! Take care,
S

The Erlang virtual machine uses a concept similar to Javas classpath. You can add an entry to it by using the erl_opt -pa IIRC.

Each know entry in the module path is checked for a given module. And the first one found is taken for granted.

Elixir itself will always generate a file named "Elixir.#{__MODULE__}.beam" directly in the neighborhood of the input file, or if mix is used into ./_build/#{Mix.env}/ebin.

4 Likes