While you're talking about Erlang specifically, the concepts you bring up can be applied to programming in general.
Why does Erlang (or any other language) have modules?
The biggest reason for me (and I think the one with the most merit) is for clarity and usability.
Modules exist as ways of grouping units of code by the responsibilities of that code. If you removed this hierarchy, wouldn't things become a lot more difficult to navigate and understand as a developer?
Comments
While you're talking about Erlang specifically, the concepts you bring up can be applied to programming in general.
Why does Erlang (or any other language) have modules?
The biggest reason for me (and I think the one with the most merit) is for clarity and usability.
Modules exist as ways of grouping units of code by the responsibilities of that code. If you removed this hierarchy, wouldn't things become a lot more difficult to navigate and understand as a developer?