[Python-ideas] Syntactic sugar to declare partial functions

Bruce Leban bruce at leban.us
Mon Aug 13 14:00:57 EDT 2018


On Sun, Aug 12, 2018 at 8:31 PM, Abe Dillon <abedillon at gmail.com> wrote:

>
> [Steven D'Aprano]
>
>> ...if we aren't even willing to move out of our own comfort zone to
>> the extent of learning accurate jargon terms from our own profession?
>
>
> Very few of us are computer scientists by profession. That's not even
> where 'lambda' comes from. In computer science, it's called an "anonymous
> function". "lambda" comes from lambda calculus.
>

Lambda calculus IS computer science. Rejecting lambda as CS is as bad as
rejecting the + operator because that's mathematics. I can legitimately
argue that + in Python is not the + in mathematics because the Python
mathematical operators operate on integers and floats, not real numbers.
Therefore we should use a different word like "floatadd". Of course not.

Lambda calculus is a model of computation. It was invented about 30 years
before the name "computer science" but is nonetheless foundational computer
science. If using lambda as a keyword leads people to go and learn about
lambda calculus that is a good thing.

And as to saying a lambda function is an "anonymous function": the
anonymity is not a property of the function. If I assign it to a name, it's
no longer anonymous. Really a "lambda" or "lambda function" is just a
function, but "lambda" is a synecdoche for "function created with a lambda
expression".

--- Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180813/40c4fb6b/attachment.html>


More information about the Python-ideas mailing list