crazy tuple ideas.

Knud Soerensen 4tuu4k002 at sneakemail.com
Fri Mar 2 10:55:49 PST 2007


With people starting to write compiler time parsers, 
maybe it would be a good idea to have a standard way for
representing syntax trees.

By allowing tuples to contain tuples we will have something 
very similar to the lisp list expression. 
Example:
Tuple!(=,E,Tuple!(*,m,Tuple!(^,c,2))); // E=m*c^2;
or maybe allowing the programmer to write just 
(=,E,(*,m,(^,c,2)))

By using a standard way for representing syntax trees 
we allow for more code sharing between project which 
uses them.

Also if the D compiler made the programs syntax tree
available doing compilation if would be possible to make 
modules which could modify the programs syntax tree at compiler time.



More information about the Digitalmars-d mailing list