if does not evaluate

Jim Newton jimka at rdrop.com
Thu Jun 10 19:56:06 CEST 2004

>>Secondly, Lisp's syntax doesn't parse well into the way people

not sure i understand what you mean by "not the way people think",
but i think i disagree with you.  lisp seems to be very similar
to the way people think, it is just that programmers have learned
over the years to think in a algol type way.

For example, if you have a bag of balls, and you want to find out
if one of them is red.  The algol type way would be

for ball in bag-of-balls
    is ball red?
       yes ==> set flag true
       no  ==> keep going
Is flag true?
    yes ==> there is a red ball
    no  ==> there is no red ball

but that seems like a very different way than people think.
the lisp way to answer the question is

is there a ball in the bag that matches condition?
condition being: is the ball red?

It seems like a much more natural way to think... at least to me.

More information about the Python-list mailing list