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

Chris Pressey <>
Wed Mar 21 18:56:56 CET 2001


Alexander Williams wrote:
> On the other hand, that brings me to an actual Erlang issue I haven't
> quite figured out yet.  One can't specifically import from a specific
> file in a specific place in the file hierarchy.  It'd be nice to have
> some way to define a "package" as the top of some file directory than
> refer to it with an import like:
> 
>   1> top.dir.dir2.dir3:function(args) ...
> 
> Unfortunately ... I don't think I can and that's a pretty hefty syntax
> hack.

"7.7 Module names

"Erlang has a flat module structure (i.e. there are not modules within
modules). Often, however, we might like to simulate the effect of a
hierarchical module structure. This can be done with sets of related
modules having the same module prefix.

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

  -- http://www.erlang.se/doc/programming_rules.shtml

_chris

-- 
"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, http://www.catseye.mb.ca/
Esoteric Topics Mailing List: http://www.catseye.mb.ca/list.html



More information about the erlang-questions mailing list