Compile-time AST manipulation API

0ffh frank at frankhirsch.youknow.what.todo.net
Sun Nov 25 04:50:08 PST 2007


Frits van Bommel wrote:
> 0ffh wrote:
>>
>> I wonder: [...]
> 
> ....
> 
> I think you just reinvented LISP :P.
> 
> (Note: all those brackets are in there to encode the AST structure into 
> the language)

Hummm... not quite. The good thing about Lisps, IMHO, is that they failed
to acquire a syntax (apart from Dylan). That, together with the fact how
ridiculously easy it is to write a simple Lisp interpreter, gives you a
powerful metaprogramming language for a rather small investment.

Another feature of the lack of syntax in Lisp is that the syntax the
mathematicians have invented for other functional languages makes my
hair stand on end... =)

It is perfectly possible to have a functional language with a C-like
syntax, as I gather will shortly be demonstrated by D2.

It's also perfectly possible to have a syntax and still do heavy duty
metaprogramming, as Stratego has already shown.

regards, frank



More information about the Digitalmars-d mailing list