merits of Lisp vs Python
Jon Harrop
jon at ffconsultancy.com
Tue Dec 12 11:06:12 EST 2006
André Thieme wrote:
> Well, macros are one (big) thing that Lisp has and which many other
> languages don't have. Their are other things too, and some of them are
> in Python as well, which is a very nice scripting language.
I think s-exprs and EVAL are the main things that Lisp has and that other
languages don't. Note that most other languages don't have these because
they were deemed to be a bad trade-off three decades ago. ;-)
> Often macros save just some bits of code. Saving one loc is not much you
> might say. But think about it the other way around.
> How would you like it to call doodleShooble() each time before you use
> the if statement? Of course you would not like it. The good thing about
> Lisp is, that you can eliminate this pattern.
You can eliminate that pattern with a HOF, of course. You don't need macros.
let if' p e1 e2 =
doodleShooble();
force (if p then e1 else e2)
--
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