Securing a future for anonymous functions in Python

Paul Rubin http
Fri Jan 7 16:24:39 EST 2005


Nick Coghlan <ncoghlan at iinet.net.au> writes:
> Add in the fact that there are many, many Python programmers with
> non-CS backgrounds, and the term 'lambda' sticks out like a sore thumb
> from amongst Python's other English-based keywords. 'def' is probably
> the second-most cryptic when you first encounter it, but it is a good
> mnemonic for "define a function", so it's still easy to parse. "Lambda
> is the term mathematicians use to refer to an anonymous function" is
> nowhere near as grokkable ;)

Richard Feynman told a story about being on a review committee for
some grade-school science textbooks.  One of these book said something
about "counting numbers" and it took him a while to figure out that
this was a new term for what he'd been used to calling "integers".

"Integer" is a math term but I think that if we need to use the
concept of integers with someone unfamiliar with the term, it's best
to just introduce the term and then use it, rather than make up new
terminology like "counting numbers" even if those words sound more
like conversational English.

For the same reason I don't have any problem with "lambda", though
it's not that big a deal.

I also just can't believe that Pythonistas keep getting into these
arguments over whether lambda is too confusing, while at the same time
there's no such discussion over far more abstruse Python features like
metaclasses.



More information about the Python-list mailing list