[Python-3000] lambda

Georg Brandl g.brandl at gmx.net
Tue Mar 25 22:01:18 CET 2008


Benjamin Peterson schrieb:

>     Guido once said that he hadn't found a better name. Well, I think
>     that almost *any* name will do better! ;-) Especially a name that
>     emphasizes the fact that lambda construction are in fact functions.
>     This is what Guido repeats over and over again: lambda is just
>     synctactic sugar for a function definition. Here are suggestion for
>     a new name for lambda, which will much better describe what it is,
>     namely a *function*. Since function are defined with the keyword
>     "def" i'd suggest the following possibilities:
>     - ldef (local definition, or indeed, lambda definition ;-))
>     - idef (inline definition)
>     - cdef (compact definition)
>     - sdef (shorthand definition)
>     etc.
> 
> These are all abbreviations, which I find don't help much. How about 
> just local?

Please don't start this again. The past has shown that
a) there isn't a better name that everyone agrees with, and
b) there isn't a better name that Guido agrees with.

(re "local", its glaring asymmetry to "global" and "nonlocal"
makes it a non-starter.)

>     anything along theses lines will be more descriptive than "lambda"
>     and most newcommers will immediately guess what it is about without
>     wading through the manual. The python code will also be more
>     readable for non python specialists.
> 
>     It's too late to change the name lambda in Python 2.x but why not
>     change it in python 3000 since this release breaks backwards
>     compatibility anyway?
> 
> Yeah, probably too late.

Quite so. :)

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-3000 mailing list