map/filter/reduce/lambda opinions and background unscientific mini-survey

Donn Cave donn at
Sat Jul 2 07:06:19 CEST 2005

Quoth Tom Anderson <twic at>:
| I disagree strongly with Guido's proposals, and i am not an ex-Lisp, 
| -Scheme or -any-other-functional-language programmer; my only other real 
| language is Java. I wonder if i'm an outlier.
| So, if you're a pythonista who loves map and lambda, and disagrees with 
| Guido, what's your background? Functional or not?

Dysfunctional, I reckon.

I think I disagree with the question more than the answer.

First, map and lambda are two different things, and it's reasonable
to approve of one and abhor the other.  Especially if you have a
background in a functional language where lambda works like it should.
On the other hand, the list comprehension gimmick that replaces some
of the "higher order functions" is borrowed from Haskell, as you probably
know, so it isn't exactly alien to functional programming.  Prelude.hs
defines map:  map f xs = [ f x | x <- xs ]

Secondly, if there's anything I detest about the Python development
model, it is the tendency to focus on gimmicks.  For 2.X, elimination
of these features would be an atrocity, a gratuitous change that would
break programs - but I don't think anyone who counts has seriously
proposed to do that.  With 3.X, we are talking about a different language.
May not ever even get off the ground, but if it does, it's supposed to
be distinctly different, and we need to know a lot more about it before
we can reasonably worry about trivial details like whether map is going
to be there.

I personally think real FP is seriously hot stuff, but I think Python
is a lousy way to do it, with or without map.  I suppose there's a
remote possibility that 3.X will change all that.  Or more likely,
there will by then be a really attractive FP language, maybe out
of the "links" initiative by Wadler et al.

	Donn Cave, donn at

More information about the Python-list mailing list