On Tue, 16 Feb 2021 at 16:40, Ned Batchelder <n...@nedbatchelder.com> wrote:
>
> "lambda" is unnecessarily obscure.
>
> Beginner: "why is it called lambda?"
>
> Teacher: "Don't worry about it, just use it to define a function"
>
> I'm not taking a side on whether to change Python, but let's please not
> lose sight of just how opaque the word "lambda" is. People who know the
> background of lambda can easily understand using a different word.
> People who don't know the background are presented with a "magic word"
> with no meaning.  That's not good UI.

Agreed. When lambda was introduced, "anonymous functions" were not as
common in programming, and the most obvious example of their usage was
in lisp, where "lambda" was the accepted term. Since then, lisp has
not gained much additional popularity, but anonymous functions have
appeared in a number of mainstream languages. The syntax is typically
some form of "a, b -> a+b" style, and *never* uses the term "lambda".
So someone coming to Python with any familiarity with other languages
will now find Python's form atypical and obscure. People coming with
no experience of other languages will need to have a history lesson to
understand why the term is "lambda" rather than "something more
obvious".

People can, and will, learn Python's syntax. This isn't a major
disaster. But if this were a new feature, we'd not be having this
discussion, and "lambda" wouldn't even be a consideration.

I'm also not taking a side on whether a change is worth the
disruption. Personally, I prefer the arrow syntax, but we're not
making a decision in a vacuum here. Someone has to make a case
(probably in a PEP) if this is going to change, and the trade-offs
should be clarified there.

Paul
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/M25C6O55JCYLFOUW7DPPFGAETVOGN6R5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to