Packages in Erlang: new documentation

WILLIAMS Dominic <>
Thu Sep 4 16:03:17 CEST 2003


Richard Carlsson wrote:

> I absolutely agree: the . prefix notation is not recommended unless
> you really need it. Using -import(Module) is much better. Maybe we
> should also add a declaration -import_as(Module, Alias).

But later, when I described the Eiffel renaming scheme, you wrote:

> Yes, but it does not work in Erlang, because there your _cannot_
> rename a module, since you cannot know if someone is going to
> call it via apply(M, F, [...]) or spawn(M, F, [...]). It is not
> possible to know in general what the M:s are, or even to which
> M the caller is actually referring (the first M, or the later added
> one that was renamed?)

Hmm. You suggested -import_as(Module,Alias) yourself. Is that any
different? Or did you suggest it before having thought of those
difficulties?

Anyway (Eiffel philosophy again), shouldn't things be hard for
compiler programmers, not application programmers ? ;-)

Oh, and I very much share the concern voiced by others about tying in
the package structure to the filesystem. In addition to reasons
already given, I dream of a Smalltalk-like IDE for Erlang, where the
code is not in files at all (and is interpreted, or compiled
on-the-fly).

Regards,

Dominic.



More information about the erlang-questions mailing list