[erlang-questions] Why do we need modules at all?

Joe Armstrong <>
Wed May 25 10:37:39 CEST 2011

On Wed, May 25, 2011 at 7:46 AM, Tim Watson <>wrote:

> > Unfortunately information about individual functions is
> > scattered all over the place. I want the source, the type signature,
> > the documentation. These are available in a variety of different
> > formats in different places. Documentation is in untagged comments
> > in @tagged edoc format or in XML in a completely different file.
> Yes, this is a really important part of it. Being able to slurp in
> Erlang projects from the file system (and github, etc), access all
> this information and provide it in a searchable fashion would
> *already* put us way ahead of the crowd in terms of discovery.
> > Silly design question: if multiple people can edit (say) a wiki
> > of functions what formatting standards should be enforced?
> >
> >    - the last person who edited the text
> >    - some "moderator" (who)
> >    - by a pretty printer
> >     (is there a *really good* pp? - with color syntax marking)
> I think there are reasonable ones around. Take a look at
> http://tidier.softlab.ntua.gr:20000/tidier/getstarted. I would also
> propose that you let the viewer configure the pp to their own
> preferences. Given that you're actually storing abstract code (or AST
> or something like that) rather than lines of source code anyway, this
> is just human readable representation after all. Let people view with
> whatever (potentially hideous) whitespace &c convention they like.

Very interesting idea - there was once a pascal pretty printer that analysed
your code
and inferred the style that you preferred - "Umm this guy likes semi-colons
at the end of
line ..." they in applied it to code you hadn't written.

> >> I'm guessing this will require patching the compiler to preserve the
> >> type specs in the beam code. That is something I would need help with,
> >> but may be trivial for others.
> >
> > Easy - it is there already (I think) poke around in beam_lib.erl
> > this analyses the .beam files.
> >
> I was pretty sure this wasn't the case. I'll dig in to beam_lib at
> lunch time and have another look.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110525/41280b75/attachment.html>

More information about the erlang-questions mailing list