Hello,

On Fri, 12 Feb 2021 09:55:16 +0300
Paul Sokolovsky <pmis...@gmail.com> wrote:

> Hello,
> 
> On Thu, 11 Feb 2021 21:36:25 -0800
> Guido van Rossum <gu...@python.org> wrote:
> 
> > > but I think it'd probably be
> > > better to use similar syntax to C#, Java, and Javascript instead,
> > > and use () -> [12] or () => 12...
> > >    
> > 
> > Agreed. I'd prefer the JavaScript solution, since -> already has a
> > different meaning in Python return *type*. We could use -> to
> > simplify typing.Callable, and => to simplify lambda.
> 
> Great to hear there's no desire to stray away from JavaScript just for
> the purpose of being different.

... And on the 2nd thought, that won't work. The reason it works in JS
is that it doesn't have tuples. In Python, "(a, b) => (1, 2)" means
"compare a tuple for greater-or-equal".

But fear not, we can steal "lambda operator" from Haskell:

\(a, b): (1, 2)

Or... we can do nothing, and just promote macro usage in Python,
because it's trivial to replace "lambda" with actual unicode lambda
character (or anything else for that matter, for as long as "anything
else" is not an empty string and not ambiguous with already existing
constructs): https://aroberge.github.io/ideas/docs/html/lambda.html

[]

-- 
Best regards,
 Paul                          mailto:pmis...@gmail.com
_______________________________________________
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/FWQZHNEGZ4OVGZPQCJB3BERRKU354HXF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to