On 24/05/2020 23:58, Chris Angelico wrote:
Maybe it's function call syntax that is the weird one. It might be
familiar to us, but maybe it's the one that's actually causing the
weirdness. Suppose we wrote the function last:

(data)sort

Now it's basically become a pipeline. And yet this syntax looks so
utterly bizarre that none of us would accept it...
Well ...
ChrisA
Good outside-the-box thinking, Chris.
The kind of spelling-out-the-obvious and looking-at-the-familiar-from-a-new-viewpoint
to come up with a revolutionary idea that is characteristic of genius -
Darwin, Einstein et al.  (Was it entirely your own idea? :-))
I'm sure one could get used to this syntax.
In fact it's *more* intuitive than what we do now (evaluation is strictly left-to-right),
 as can be seen with composed functions:

    ((path)str)len
# First does something with 'path' and 'str', then does something with the result and `len'.
# Not: first does something with `len' and ... what?

Jesus, why is the whole world not using it already?
Maybe for the same reason the world still uses QWERTY keyboards.
Maybe that's what programmers (well, the smart ones:-))  in 2100 using Python 42 will use.

Hell, it's currently illegal syntax.  Maybe it could be introduced soon (would the new parser help? :-)) , in the hope that people will gradually fall out of the old usage `sort(data)`, so that eventually it can be deprecated and finally dropped (by 2100 or thereabouts).
(Guido, are you listening?)
_______________________________________________
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/HYY3ZA6AYUEZYMXKL3RSRTLFBDKGAO6E/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to