[erlang-questions] Time to update programming rules?

Richard A. O'Keefe <>
Mon Sep 8 07:36:44 CEST 2008

On 8 Sep 2008, at 3:16 pm, Benjamin Tolputt wrote:

[about a number of side issues and avoiding the core of it]

I agree that we should get an official opinion about what
is likely to happen to the dotted names stuff in Erlang from
the Erlang/OTP developers.

There are two fundamental problems with dotted module names.
One is perhaps a matter of opinion.

First: the fact that dotted module names are like "absolute"
file names rather than "relative" file names.  There is a
rival design, or more precisely, a sketch of one, available
for discussion, which does not have this problem.  Some day
I should convert it to EEP form.

It is idle to say that an IDE can fix up module names when
you move a cluster of modules; that only works if the IDE
can *find* module names reliably.  And that leads us to ...

Second: the dotted names proposal is a *compile-time*
retrofit to a language with a *run-time* approach to
naming.  The compiler or preprocessor or whatever simply
cannot find all references to a module.  The rewrite
rules for handling "names" are inconsistent (some occurrences
of an "abbreviated" module name will be expanded, others will
not) and in any case do not apply to module names determined
at run time.  If this were an essential property of every
possible way to add macro-level structuring to Erlang, we'd
just have to live with it, but as it happens, there is also
a sketch of an approach that doesn't have this problem
posted to this mailing list years ago and available for

It is entirely possible to have a macro-level structured
module system for Erlang in which ALL module references in
source code are simple identifiers, so that there are
_necessarily_ no inconsistencies about rewriting module
names (because they don't get rewritten).

More information about the erlang-questions mailing list