Meta-Erlang (was RE: Erlang vs Java revisited)

Ulf Wiger (AL/EAB) <>
Wed Sep 28 16:21:12 CEST 2005


For the next person itching to explore parse transforms:

One of the annoying things about parse transforms is that
you tend to have to cover the entire language even if you
just want to add a small tweak.

Last time I attempted one, I decided to try with syntax_tools.
It seemed to me as if it would be possible to write a small
and maintainable parse transform using syntax_tools, but 
I got stuck on some details, and was then diverted.

Unfortunately, I have lost both my unfinished code and the
recollection of whatever it was I got stuck on. All I have
left to contribute is moral support. :)

/Uffe

> -----Original Message-----
> From: 
> [mailto:]On Behalf Of Vlad Dumitrescu
> XX (LN/EAB)
> Sent: den 28 september 2005 15:35
> To: Richard A. O'Keefe; 
> Subject: Meta-Erlang (was RE: Erlang vs Java revisited)
> 
> 
> Hello,
> 
> > -----Original Message-----
> > From: 
> > [mailto:]On Behalf Of 
> Richard A. O'Keefe
> 
> > Programs are data.  My big complaint about older IDEs is that 
> > they encouraged people to think of programs as exclusively 
> something 
> > human-written, when our best hope of reliable software is 
> to write as little of 
> > it as possible.
> 
> Is it the IDEs that did that? 
>  
> > What would Template Haskell look like in Erlang?
> 
> Parse transforms are a kind of meta-programming, just not 
> embedded in the language and quite clunky to use.
> 
> Since the compiler is readily available to any Erlang 
> program, including itself, and the abstract syntax is already 
> expressed in Erlang terms, I suppose it would be relatively 
> easy to add some syntactic sugar through a parse transform to 
> enable "proper" meta-programing.
> 
> The lack of static typing would mean that one should be 
> extremely careful when writing and testing meta-programs, but 
> probably just as much as when writing "normal" parse transforms.
> 
> I think it would be a very interesting area to explore. If 
> only I could find the time...
> 
> best regards,
> Vlad
> 
> 
> 
> 



More information about the erlang-questions mailing list