merits of Lisp vs Python

Christophe Cavalaria chris.cavalaria at free.fr
Sat Dec 16 05:59:22 EST 2006


Paul Rubin wrote:

> Kirk  Sluder <kirk at nospam.jobsluder.net> writes:
>> Personally, I've always preferred use the imperative to describe
>> basic math rather than the passive. This would seem to map better to
>> RPN than infix.
> 
> For writing down complicated, nested expressions too?  That's very
> unusual.  E.g.
> 
>   n! = (n/e)**n * sqrt(2*pi*n) * (1 + (1/12n)) * ...
> 
> vs. the same thing in Lisp notation, and that's not even so complicated.

Yes, infix is better ( and note that Math uses primarly infix notation for
common operators ) because you have a clear view of the evaluation tree
that way. With prefix or postfix notation, you need to parse the full
expression to find what goes to the first parameter of that +, and what
goes to the second parameter.

I would say that prefix/postfix is somewhat easier to write, but that infix
is far far far easier to read.




More information about the Python-list mailing list