On Sun, Feb 14, 2021 at 4:26 AM Serhiy Storchaka <storch...@gmail.com>
wrote:

> Lambda is a questionable feature at all. With support of comprehensions,
> local functions, the operator and functools modules there are not many
> use cases for lambda expression. They are supported, well, but it is not
> significant part of the language.
>

Thank you -- I'm not quite sure they are "questionable", but they do have
limited use in the language, and far less use then they did back in the
early days of Python. In fact, most of the uses I've seen of lambda in
recent code (particularly from newbies) is totally unnecessary.

If the only thing this proposal is about is a way to create small anonymous
functions without using the keyword "lambda" -- it is pretty darn pointless.

And frankly, this compact notation is a lot harder (for me at least) to
parse at a glance -- "lambda" may be a strange and confusing word for
newbies, but it's easy to look up, and it's really obvious that *something*
is going on there. Whereas parentheses are used all over the place, and are
often optional. And more "line noise"-like symbols like => isn't really
going to help.

In fact, I've only written a smattering of C, but it still requires some
extra thinking to identify where a function is being defined -- a keyword
(like def) would be so much more clear to me.

Final point:

Python has been around a long time, there's a lot of code already written
-- any changes to syntax should only be ones that add real functionality or
expressiveness -- a slightly-easier-to-write (and maybe read) anonymous
function syntax is nowhere near that threshold.

-Chris B

-- 
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
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/U4P4CX7Q2RTV6BSPMWY2TD7LA53EPSYF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to