Fun with Erlang (was Re: Stand Alone Erlang for Windows. yet again)

Chris Pressey <>
Thu Mar 22 03:07:30 CET 2001

Alexander Williams wrote:
> On Wed, Mar 21, 2001 at 11:56:56AM -0600, Chris Pressey wrote:
> > "If, for example, an ISDN handler is implemented using five different
> > and related modules. These module should be given names such as:
> > isdn_init, isdn_partb, isdn_..."
> I'm well aware of this.  My problem is it rather, well, "sucks."
> "Sucks" isn't too strong for this particular bit, I don't think.

I don't think it sucks.  Nested packages are often a sign of
overclassification anyway - then again I'm more familiar with Perl than
Python or Java, perhaps that has coloured my viewpoint.  Nested packages
are handy when you have one abstract package (directory) and several
different concrete packages that implement it (subdirectory) - but
Erlang has behaviours that should probably be used instead - one
behaviour and several packages that implement that behaviour.

But I honestly don't mind that it's flat.  What I worry about a bit more
(although not too much) are namespace clashes.  What if someone else
wants to release a module named 'foo' while I want to release a module
called 'foo'?  How does the user that wants to use both of our modules
deal with it?  Should I prepend every module I name with some unique
prefix just to be safe?  I'd rather not, as that tends to make source
code rather less readable.


"Ten short days ago all I could look forward to was a dead-end job as a
engineer.  Now I have a promising future and make really big Zorkmids."
Chris Pressey, Cat's Eye Technologies,
Esoteric Topics Mailing List:

More information about the erlang-questions mailing list