It's not my call in Python so I can't demand one way or another. I was just saying that it makes less sense and has always been less readable for me and most developers I've talked to, as it resembles a comparison operator.
Also, mathematically, mappings are typically written with a skinny arrow, so it looks more like psuedo code. No one would use double arrow when writing it on a whiteboard. To me it seems an obvious choice and I thought I'd let it be known before it gets implemented On Sat, Feb 13, 2021, 16:47 Paul Sokolovsky <pmis...@gmail.com> wrote: > Hello, > > On Sat, 13 Feb 2021 16:25:24 -0500 > Cade Brown <brown.c...@gmail.com> wrote: > > > In my humble opinion, arrows should be '->' instead of '=>'. It always > > annoys me when languages use that symbol > > That's unlikely, as was discussed in this thread previously: > > a) JavaScript already uses "=>", and it doesn't make sense to be > different just for the purpose of being different. That will only > confuse people. > b) Python already uses "->" for function return *type*. And there's > idea to generalize it to *function type* in general. E.g. a function > "(a, b) => a + b" can have type "(int, int) -> int". > > (I agree that intuitively, types would rather have "fatter" arrow, > because types are "meta", but again, that doesn't correspond to the > practical context we live in. So, let's look at the bright side of it - > "=>" is more visible, because otherwise, arrow functions are really > skinny and can be easily missed at all). > > > > > > On Sat, Feb 13, 2021, 14:52 Paul Sokolovsky <pmis...@gmail.com> wrote: > > > > > Hello, > > > > > > On Sat, 13 Feb 2021 09:24:51 -0800 > > > Matthias Bussonnier <bussonniermatth...@gmail.com> wrote: > > > > > > > Works well with 0 parameters and currying, read almost like a > > > > haskell function definition. > > > > > > > > f = () => ((b) => b) > > > > g = (a) => (b) => b+a > > > > h = (a) => (b) => (b, a) > > > > i = (a,b) => a > > > > > > > > print(f()(2)) > > > > print(g(1)(2)) > > > > print(h(1)(2)) > > > > print(i(1, 2)) > > > > > > Thanks for testing! Yeah, I didn't even think about recursive syntax > > > cases, glad to know they work out of the box. Seems like writing > > > macros for Python isn't that hard, even on the token stream level. > > > > > > And this comparison with Haskell - don't know if it's good or bad. > > > Definitely feels a bit scary ;-). We'll see how this idea goes... > > > > > > > > > [] > > > > > > -- > > > 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/R7QVXQIOMATKUGE2U3KWBAPIVAJPZVJB/ > > > Code of Conduct: http://python.org/psf/codeofconduct/ > > > > > > > -- > 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/P3BVM733IEOTLYBI26MQGXAQMDEV4V7A/ Code of Conduct: http://python.org/psf/codeofconduct/