On Tue, Jan 18, 2022 at 07:40:40AM -0700, 2QdxY4RzWzUUiLuE@potatochowder.com wrote:
On 2022-01-18 at 12:07:15 +1100, Steven D'Aprano firstname.lastname@example.org wrote:
I would be more sympathetic to this idea if:
- I knew how to easily type all those brackets on the keyboard,
without having to use a GUI character picker.
That's between you and your OS.
Is there any other Python syntax which is likewise OS-dependent?
To be clear, using non-ASCII strings or identifiers is certainly supported, and that's fine, but beyond that narrow use, are there Python keywords or operators or other syntactic forms that require people to learn a different, OS-dependent input method for those forms?
I think the answer is no, but I am privileged enough to us a US-ASCII keyboard. Maybe there are people using, oh I don't know, Bulgarian keyboards, who can type *nearly all* of Python syntax just fine on their keyboard but have to use a special input method for typing decorators and bitwise operators.
I believe all the major ones have ways to enter arbitrary characters and/or switch keyboards without a GUI (I use Linux, and I know for sure that it does).
Okay. Without looking it up, how would *you* type ⟮ U+27EE "Mathematical Left Flattened Parentheses"? On your honour now, don't look it up.
Do you think that the majority of Python programmers, especially beginners, will be keen to memorize a dozen or so key combinations to write parentheses and brackets?
Someone on this list keeps saying that everyone wants to know how to play the piano, but that no one wants to put in the hard work to learn to play the piano. ;-)
I read close to every email on this list and I've never seen anyone use that phrase before. Maybe I've missed it. Or maybe you're thinking of another list?
- I had a guarantee that all of the bracket characters would be both
available and easily distinguishable in any typeface I used.
You don't have that gurantee now, unless you check for all those things yourself ("easily distinguishable" is subjective) before you use a typeface. *only half a wink*
Indeed. That is my point.
Let me make it a little more clear then.
In this wonderful world of the Internet era, where code collaboration, sharing of open-source software, and forums where people can post code for public viewing, how do I know that the parentheses and brackets I choose will be visible to all my readers?
If I post code asking for help "why am I getting a SyntaxError here?"
spam(1, eggs(2, cheese(3, fe(), fi(), fo())))
using fancy Unicode parentheses, how do I know that the people I am asking for help will see what I see, instead of
spam 1, eggs 2, cheese 3, fe , fi , fo
spam□1, eggs□2, cheese□3, fe□□, fi□□, fo□□□□□
We have to live in the world we have, not the world we want. Given the state of Unicode support in typefaces, editors, IDEs, web forum software, etc, what percentage of the time do you think that using fancy parentheses would *enhance* communication and collaboration, rather than degrade it?