PEP 312 - Making lambdas implicit worries me, surely it's just the name 'lambda' that is bad...

Stephen Horne intentionally at blank.co.uk
Mon Mar 3 15:48:04 EST 2003


On Mon, 03 Mar 2003 03:22:44 -0800, Erik Max Francis <max at alcyone.com>
wrote:

>Stephen Horne wrote:
>
>> A major problem with 'lambda' is simply that it is an obscure name.
>
>I don't agree.  The term "lambda" is well-recognized throughout the
>computer science community as a construct which introduces an anonymous
>function.

I'm not convinced this is true. For anyone who is familiar with
functional languages it would be but, as far as I recall, the word
lambda was hardly mentioned in all my academic study. When I was
specifically studying functional languages, the standard phrase was
"function" - with "first class" specified only when necessary to
clarify a point.

I've worked with enough other programmers to know that my experience
is far from unique.

A lot of programmers only have experience with imperative languages,
and even if the word lambda was mentioned once or twice in a
particular lecture a decade ago, I wouldn't necessarily expect them to
remember it.

Then there's the fact that we use the name of the symbol that Church
used, rather than the name of the abstraction, which IMO is rather
obtuse. The abstraction is a (first class) function - not a Greek
letter. It may be hard to see for those of us who are familiar with
the word, but would we prefer the 'pow' function to be called
'superscript' just because thats how powers are written in
mathematics? The principle is the same. I prefer a spelling to a
metaspelling ;-)

>If you're new to programming and you're learning
>a language and you bump into a "lambda," one would hope you'd have the
>actual energy and willpower to look it up.

In general I agree with this - a hidden lambda, disguised in syntax
that is already commonly used for many other purposes, is far worse
than the existing explicit lambda. But many people do have problems
with the word lambda and having learned a different subset of computer
science to the one you learned (or having forgotten certain parts
through lack of everyday use) does not make their viewpoint invalid.

-- 
steve at ninereeds dot fsnet dot co dot uk




More information about the Python-list mailing list