Packages in Erlang: new documentation

Vlad Dumitrescu <>
Fri Sep 5 09:56:33 CEST 2003


From: "Richard A. O'Keefe"
> (1) Module names must be completely decoupled from file names.
>     [This does not mean that you cannot have a _default_ mapping
>     from module names to file names, only that you cannot have a
>     _fixed_ mapping.]

I am wondering... Some kind of mapping to files must exist, because one has to
be able to track down errors and crashes to their source code. And this mapping
should not rely on a running Erlang system, because in case of a hardware
failure it might be impossible to get one up.

Hmm, as it just dawned on me, there are really two different mappings:
    module <-> location of beam code
and
    module <-> source code file.

The former is interesting for the code loader, and the location could be a file
per beam, or one common file for all beams, or an URI, or something else. Any
one of these can be implemented transparently, so it's not really a big deal.

The latter is useful for us developers, and I believe is discussed here - isn't
it?

As I understand the package proposal, it is meant to help with the mapping to
source code, while inside the beam vm the namespace is still flat, only the
module names happen to have dots inside them. Is this correct? (question aimed
at Richard Carlsson) If it is, maybe not all our comments are relevant for the
moment, like for example "packages not packaging anything" is a runtime issue,
not source code related.

best regards,
Vlad





More information about the erlang-questions mailing list