merits of Lisp vs Python
Jon Harrop
jon at ffconsultancy.com
Sun Dec 10 02:25:10 EST 2006
Steven D'Aprano wrote:
> If that's the best example of what macros can be used for, frankly I'm
> unimpressed. Yes, I can see some benefit. But I don't see that the benefit
> is worth the added complexity. Maybe there are more complex tasks that
> macros are better suited for.
You both seem to be trying to implement a pattern match. It would probably
be productive for you to compare Python and Lisp to languages that have
pattern matching.
For example, look at the symbolic simplifier here:
http://www.ffconsultancy.com/free/ocaml/symbolic.html
or the interpreter here:
http://www.ffconsultancy.com/free/ocaml/interpreter.html
Implementing this kind of stuff in Python is probably a nightmare. At least
you can address Lisp's deficiencies with macros...
--
Dr Jon D Harrop, Flying Frog Consultancy
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/index.html?usenet
More information about the Python-list
mailing list