Something is rotten in Denmark...

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Jun 3 20:40:53 EDT 2011


Alain Ketterlin wrote:

> You must be kidding. Like many others, you seem to think that Scheme is
> a typical functional language, which it is not.

I never said that Scheme is a functional language -- I'd be
the first to acknowledge that it's not. I do know what real
functional languages are like.

However, Scheme is more relevant to this discussion than
Haskell, precisely because it's *not* purely functional --
it does allow existing bindings to be changed. Yet its
lambdas are late-binding, and nobody seems to get tripped
up by that they way they do in Python.

Why not? It's because Scheme encourages a style of programming
which favours creation of new bindings rather than changing
existing ones, so most of the time the bindings captured by
a lambda don't change later.

-- 
Greg



More information about the Python-list mailing list