[erlang-questions] Erlang documentation -- a modest proposal
Wed Sep 28 07:52:48 CEST 2016
> I see an interest in keeping all source code in abstract code at least as
> a compilation option.
By the time you have included the original spelling of every token,
all white space, and every comment in your AST (which is what Joe
was talking about), you have replicated the *concrete* form of the
source code, just broken up into little bits. If you record the
source code (in some compressed form), and you record the start and
length of every term, you can extract the source code for any term
effortlessly, no concatenation required.
We already have the option to store an AST in a BEAM file,
By the way, Joe, do remember my proposal years ago to hold
Erlang source code in SGML? I don't remember if I mentioned
back then that you can compile straight out of the SGML.
The VisualWorks Smalltalk system holds source code in XML
and loads "parcels" directly from the XML form. (Once it
gets down to the equivalent of a single function clause it
stops and switches to plain text, but there's no need for it
to do so.)
More information about the erlang-questions