Ok, thanks a lot. My day job is programming Lisp, and since I started two years ago, I've seen the light about a number of things, including macros. It would be cool to have access to the Abstract Syntax Tree of a Cython expression/statement/function/etc., and be able to manipulate it at compile time. But it sounds like that's a whole other project. :)
Best, Martin Dag Sverre Seljebotn wrote: > Martin C. Martin wrote: >> Great! >> >> How does it compare to Lisp's macros? > I'll try to answer, but I'm guessing about your assumptions so do ask > again if I miss. > > This is work that is only relevant to the internal Cython compiler, so > it doesn't compare (or compares very poorly) with LISP. Ie when > transforming the parse tree one is transforming the input Cython source > to output C source, but the transform itself doesn't live within that > parse tree at all. > > If what you are asking instead is: How easy is it to write transforms > compared to writing LISP macros, then the answer is still that it > compares poorly, but then the goals are rather different too (the number > of transforms will be max ~30 I think, and the number of LISP programs > are... :-) ) > > > Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
