9
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 21 Sep 2026
9 points (90.9% liked)
China
610 readers
16 users here now
Genuine news and discussion about China
founded 4 years ago
MODERATORS
Have you ever actually tried it? Simple example: Try using an emoji for an assignment:
⭐=fooorfoo=⭐It doesn't work? Why? Because emojis aren't valid for assignments. Why? Because Python follows Unicode Standard Annex #31 (UAX #31). Since emoji are classified as symbols, you can't use them for assignments.
Who cares? We're taking Mandarin, right? Except there's a practical problem: The most common input method for typing Mandarin (and other languages with bazillions of characters) outputs full-width characters (e.g. = full width equal sign) and this screws everything up. It does this for equals, parentheses, commas, and a few other symbols.
My friend said that was the most annoying thing: Having to constantly switch back and forth.
However, many characters that are used as normal words also don't work for assignments. For example, Chinese numerals: 一, 二, 三 (the English equivalent of,
one, two, three)Then there's a practical problem: It looks wacky AF, making the code harder to read:
The input method editor problem is the biggest one because it really slows you down. Having to switch in and out of it constantly also creates huge friction when coding.
I just asked him and he just gave me something I didn't even think about: Apparently git diffs (on the command line) don't display Mandarin characters properly! That right there would make programming in Mandarin a no-go situation without a special git tool.
Apparently, if you want to be able to deploy your code at all you have to know English. Or at least, Linux English (e.g.
lsand similar programs haha).You can't even tell Pinyin from Chinese characters.
Also, most Chinese input methods support toggling between half-width and full-width symbols independently. Even if you really want to program using Chinese characters, you just need to switch to half-width symbols.