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

Alexander Williams <>
Thu Mar 22 05:45:21 CET 2001

On Wed, Mar 21, 2001 at 08:07:30PM -0600, Chris Pressey wrote:
> 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.

The way I generally structure code, I'd have one behaviour directory
with multiple directories beneath for packages, each of which'll
require multiple files, as will the overall behaviour glue.  If I'm
trying the impliment an application on top of all this, that's one
more subdirectory over the behaviours.

> 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.

To use an example from the MU* concept to illustrate the problem
(incidently, I heavily agree with you here):

We have a generic sword with the name sword.erl ...  And I want to
build a custom version that inherits the methods of the first one, so
do so ... but call it magic/sword.erl.  Makes sense, structurally
... but I can't get to it in a flat access structure.

I've read the description of the Java module system that was
previously posted and like it a lot, except for the inability to
resolve packages with a single import, allowing automatic sub-package

Alexander Williams ()               | In the End,
  "Blue Jester needs food."                             | Oblivion
  "Blue Jester needs fuku-wearing cuties."              | Always                                | Wins

More information about the erlang-questions mailing list