Packages in Erlang: new documentation
Ulf Wiger (ÄL2/EAB)
Thu Sep 4 11:20:56 CEST 2003
From: Richard Carlsson [mailto:richardc@REDACTED]
>It seems that the information about this, and how it works, has not
>reached enough people. I have therefore written a new piece of
>documentation about packages in Erlang, in the hope that it will
>be better understood, and more people will try it out:
>In particular, see the section about migrating code into packages.
>All comments appreciated,
I'll briefly report my experiences with packages so far:
I decided to try packages in a hobby project, called CyberAthletics.
It's a project sponsored by the Swedish Athletics Association aiming
at providing wireless services to the audience at Athletics competitions.
The dotted naming convention did offer a relief from the namespace
problem. Examples from my CyberAthletics (or "cath" for short) application:
I actually like the -import() clauses. I think they add useful
information, and the discipline it requires is beneficial IMHO.
I dislike the .lists notation, and haven't used it.
A slight nuisance is that the path under src/ becomes cath/server/...
and also under src/ (following the OTP convention) is cath.app.src.
This interferes with tab completion, and I also feel that there is
one level too many in the directory structure.
I'm not thrilled by the idea of tying module names to directory
structure closer than before. I have yet to come up with a better
I modified systools_make.erl in order to make it handle dotted module
names while building boot scripts. I noted that embedded code loading
doesn't work, but for this, one has to modify erl_prim_loader -- doable,
but I haven't done it. The 'builder' contrib at jungerl also understands
All in all I find packages to be an improvement, even though some work
remains in order to integrate it fully with OTP.
More information about the erlang-questions