I sing the praises of lambda, my friend and savior!

Jeff Shannon jeff at ccvcorp.com
Wed Oct 13 20:32:15 CEST 2004


Clark C. Evans wrote:

>Instead of arguing against lambda, which is already in the core language
>and used by many people, perhaps you could suggest a syntax improvement
>that would make lambda more understandable?  Your're advocating taking
>away a very nice tool without proposing a resonable replacement.
>

To be a bit more accurate, I'm not so much advocating its removal, as I 
am concurring with the "powers that be" who've already been discussing 
dropping it from Py3K.  Several people were bemoaning that (rumored) 
decision; I was merely pointing out that I can understand why they're 
(supposedly) doing so, and that I don't think that it's the sort of loss 
that some are claiming.  Even if you convince me that lambdas *are* 
amazingly useful... well, it doesn't accomplish anything, because I'm 
not influencing anyone to drop lambdas, I'm just agreeing with the 
people who are already dropping lambdas.

(And for the record -- yes,  I can now see a few special cases in which 
lambdas do improve clarity.  It still seems, however, that these are 
definitely special cases and are therefore not special enough to break 
the rules.  I do feel that the introduction of lambdas broke a number of 
Python's rules.  Once again, lambdas may offer local maxima in clarity, 
but at a cost in global clarity.  Reputedly, GvR also feels that lambdas 
break Python's rules, and he's becoming pickier about breaking the rules 
as Python matures... thus the discussion of dropping them in Py3K.)

Jeff Shannon
Technician/Programmer
Credit International




More information about the Python-list mailing list