[erlang-questions] Typed records and erl_parse

Thomas Lindgren thomasl_erlang@REDACTED
Tue Dec 5 14:05:24 CET 2006

--- Ulf Wiger <ulf@REDACTED> wrote:

> Den 2006-12-05 12:29:55 skrev Thomas Lindgren
> <thomasl_erlang@REDACTED>:
> >
> > --- Tobias Lindahl <Tobias.Lindahl@REDACTED>
> wrote:
> >
> >> 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
> look
> > at -record.
> >
> > 2. Those who store abstract syntax trees
> persistently.
> > This includes those of us who use +debug_info,
> from
> > what it looks like.
> Most who store abstract syntax trees persistently
> don't
> necessarily care what the record forms look like per
> se.
> Isn't this more or less the same as #1, except
> perhaps
> that it increases the backwards compatibility
> challenge?
> (OTOH, debug_info abstract forms are tagged with
> version.)

As I understood it, Tobias proposed to make a
NON-backwards-compatible change:

"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 mailing list