Lambda (was: Augmented assignment)

Russell Turpin noone at do.not.use
Sat May 13 16:35:33 EDT 2000


William Tanksley wrote:
> Guido, for one.  He points out that it doesn't fit into the 
> language -- its syntax is all wrong, and the scoping rules 
> you need/want to work with it are very different from the 
> scoping rules Python enjoys.

Maybe it would be more pleasing aesthetically if it were
called something other than lambda?  I like it in Python, 
for the very practical reason that it is a nicer way to 
generate anonymous functions than the alternative. You 
should not have to create a named function solely for the 
purpose of spitting out an anonymous function! That often
defeats the desire to have an anonymous function .. "gee,
might as well use a named function directly, even if all
I do is pass it in ..mumble, grumble."

> Me?  I hate the whole lambda calculus, not because of 
> what it is, but because of what many people think it is.  
> They think that it's the whole of computer science, the 
> ultimate way to express and reason about programs, when 
> in reality it's merely a shabby and incomplete model of 
> how Fortran fails to work. ..

If you're going to hate the lambda calculus, you should
at least hate it for the right reasons. First, nothing
about the lambda calculus is a reaction to Fortran. The
lambda calculus is a formal logic; Fortran is a programming
language. Church published his papers on lambda calculus 
starting in the 40s; Fortran was invented in the 50s. I 
could go on, but I think the time precedence pretty much 
closes the case, weird physics notwithstanding.  Second, 
the lambda calculus IS very important to people who 
formally reason about systems. I have to point this out, 
since some of the best people at doing this -- some of the 
few doing it commercially! -- are friends of mine.

BUT .. if you want to point out that formal reasoning
about systems is not much of computer science, and has
very little to do with practical software construction, 
especially anything as RADdy and convenient as Python, 
you would be right on the mark.

Russell



More information about the Python-list mailing list