[erlang-questions] Multiple modules

Costel Vrinceanu cv.erl.q@REDACTED
Fri Oct 6 22:12:21 CEST 2006


If we separate files from modules/make them orthogonal, then it should
work both ways:
  N modules in 1 file
or
  1 module in N files
or
  N modules in M files

On 10/5/06, Joe Armstrong <erlang@REDACTED> wrote:
> Modules ... thoughts
>
> Any opinion about and "endmod." declaration:
>
> Proposal
>
> The file myapp.erl might contain
>
>   -module(foo).
>   ....
>   ....
>   -endmod.
>
>   -module(bar).
>    ...
>   ...
>   -endmod.
>
> Compiling this produces
>
> myapp.beam
>
> loading myapp.beam loads all the code in foo, bar, ..., this
> has several advantages:
>
>     1) distribute only one file
>     2) modules in file cannot live a life of their own and become
>        separated
>     3) code loading is faster
>
> /Joe
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
>



More information about the erlang-questions mailing list