[erlang-questions] Typed records and erl_parse
Tue Dec 5 14:05:24 CET 2006
--- Ulf Wiger <ulf@REDACTED> wrote:
> Den 2006-12-05 12:29:55 skrev Thomas Lindgren
> > --- Tobias Lindahl <Tobias.Lindahl@REDACTED>
> >> Who would suffer if we changed the format of the
> >> record attribute given by erl_parse?
> > 1. Those who write or use parse transforms that
> > at -record.
> > 2. Those who store abstract syntax trees
> > This includes those of us who use +debug_info,
> > what it looks like.
> Most who store abstract syntax trees persistently
> necessarily care what the record forms look like per
> Isn't this more or less the same as #1, except
> that it increases the backwards compatibility
> (OTOH, debug_info abstract forms are tagged with
As I understood it, Tobias proposed to make a
"In principle, the format of the record attribute can
be made backwards compatible, but we forsee some
future problems in keeping different formats of the
current records and their typed counterparts, so we
would really like to make them the same attribute
whether they have type information or not."
In that light, category #1 basically just affects
compiler and tool writers, who can update their code
without really requiring backwards compatibility
(since in, e.g., a parse transform, ASTs are transient
and just have to be compatible with the current
compiler). But category #2 shows that old abstract
syntax trees may still turn up for some tools, and
have to be detected and/or handled (e.g., starting
with defining a new AST version). So I wouldn't say
they are basically the same problem.
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
More information about the erlang-questions