macro FAQ

Michele Simionato mis6 at pitt.edu
Sat Aug 23 02:50:33 EDT 2003


"Andrew Dalke" <adalke at mindspring.com> wrote in message news:<Dsz1b.3409$Ej6.113 at newsread4.news.pas.earthlink.net>...
> Here's a proposed Q&A for the FAQ based on a couple recent
> threads.  Appropriate comments appreciated
> 
> X.Y:  Why doesn't Python have macros like in Lisp or Scheme?

This is all very interesting and I do agree that there shouuld be a
FAQ about macros, nevertheless I don't see your message as suitable
for a FAQ. It is ways too verbose. I mean, if one asks for a macro, 
s/he already knows what a macro is. The FAQ should be much 
shorter. What you wrote is more useful and interesting for
Pythonistas than from Lispers.
I think your document should be made available on the Web somewhere,
but not in the FAQ. Of course the FAQ could and should give a pointer
to it. Maybe lispers would be helped from a page describing how
some of the things made in macros in Lisp can be made in Python.
This page should be referred in the FAQ too. It is clear, however,
that many things involving macros cannot just be done in Python
(I mean, unless implementing a custom macro interpreter in Python,
which actually I wrote few months ago as a proof of concept (google
on c.l.py for simionato macros, first hit) and which I DO NOT use ;).

Michele Simionato, Ph. D.
MicheleSimionato at libero.it
http://www.phyast.pitt.edu/~micheles
--- Currently looking for a job ---




More information about the Python-list mailing list