Packages in Erlang: new documentation
Wed Sep 3 15:41:02 CEST 2003
Richard Carlsson <richardc@REDACTED> writes:
> Since the R9B release of Erlang, "packages" (hierarchical module
> namespaces) have been available for testing by the Erlang community.
> It seems that the information about this, and how it works, has not
> reached enough people. I have therefore written a new piece of
> documentation about packages in Erlang, in the hope that it will
> be better understood, and more people will try it out:
> In particular, see the section about migrating code into packages.
> All comments appreciated,
Do you have any real-program examples? From the spec alone packages
seem to complicate things with no obvious gain. But perhaps seeing
some pretty programs without "mymod_" strewn about them would provide
the necessary temptation?
I suppose that etags and distel will both need updating to resolve
package names if they're to work on such code. But it looks like you
can fully resolve packages from the source file alone, thanks to
excluding 'import_all' - is that right?
In Java you can't do that, e.g. in:
To resolve 'Baz' you need to go running around the code-path to see if
it's in the 'foo' or 'bar' package.
(Fortunately this creates a thriving industry for fancy development
tools. They run around figuring out all the things that can no longer
be known by old-fashioned techniques like reading a source file :-)
More information about the erlang-questions