merits of Lisp vs Python

Paul Rubin http
Fri Dec 15 10:34:37 EST 2006


André Thieme <address.good.until.2006.dec.22 at justmail.de> writes:
> and the Lisp version has only 9:
> nth, 1+, truncate, signum, num, list, pos, zero, neg

Oh come on, you have to count the parentheses too.

Anyway, token count doesn't mean much, you have to instead go by the
user's cognitive effort in dealing with the prefix notation etc.,
which isn't purely a matter of token count.  And if (+ 2 3) were
really as easy to read as 2+3, mathematics would have been written
that way all along.

> TypeError: 'str' object is not callable
> I don't know how I can fix that. Maybe you could tell me.

>>> lazy_nif(0, lambda: "p", lambda: "z", lambda: "n")

> > All Haskell evaluation is automatically lazy, so no lambdas etc. needed.
> 
> Yes, that was what I already supposed.
> Do you also know how I can "deactivate" lazyness?

There's a Haskell builtin called 'seq' which forces evaluation but
again I'm not sure precisely how to apply it here.



More information about the Python-list mailing list