I thought China wanted more people who could read and write code?
Nobody codes in Mandarin! No, not even Chinese people.
They code in English and for a reason! It’s not a great or reassuring reason, but it’s a logical one: English doesn’t have any accent marks and a simple, 26-character alphabet. This means the meaning of code can be understood by a compiler or interpreter without having to deal with encodings or enormous lookup tables to determine if a character is valid for say, an assignment (e.g.
foo = 1).I’ve met developers that tried coding in their native languages using Python, which is one of the few languages that actually supports using non-latin Unicode characters and even right-to-left writing. They all say the same thing: It sucks and it’s not worth the trouble.
I’ve worked in Japan for years which has plenty of people terrible at English, especially in the older generations. They find (or these days google/ai/whatever translate) any documentation they need and just learn the various built-in names for things as needed. This doesn’t stop them from programming. There are websites where people have done that and uploaded the resulting translation and/or answer questions in Japanese about things. I stumbled upon similar sites in Chinese by accident.
Identifiers in code that didn’t support non-ascii identifiers were just romanized Japanese (and I assume Chinese does this as well). So
print(zeikomi_nedan);or something where that is the variable name. They don’t redefine alias print in some library or something (though I’m sure a small minority might, I’ve never seen it).I have seen some kanji-based identifier names in languages with default utf-8 support, but I still don’t think that’s the norm, especially if non-Japanese-speakers are expected to read the code such as in shared projects.
Japanese doesn’t count because half the words for things are just English with a Japanese accent!
Drink your koohii and maybe have an aisu kuriimu later to understand what I’m talking about 😁
But they don’t always mean what you think 写真はイメージです。 is a classic. “[the] picture is an image”. Of course it is! Well, except it means image in the sense of a representative sample image, not an image of the exact thing. It’s basically a disclaimer they put on product images in case it doesn’t look exactly alike.
Yes yes. You don’t need to remind us all that Japanese is stupidly complicated. Everyone who’s watched a bit of anime knows that 🤣
Sooo… Let’s say you want to actually use Japanese in your code. Which of the three writing systems would you choose?
Also, do you start counters at zero or do you…
Noun + Particle + Number + Counter?
I mean, it must be a real pain to first have to figure out what it is you’re counting before you can actually start the index 🤔
Also, make sure your fonts follow the shinto stroke ordering! Otherwise your schoolteacher will haunt you from their grave and curse your program!
😁
Having worked at a company where all the code was written by Japanese for Japanese-speakers, it’s just nouns in romaji for variables, something verb-y for functions. Some function names had particles as a part of that (still in romaji). No counters that I recall in code (though used in comments).
So serious! I was just being silly.
I bow my head in apology, for making you consider my statements with such intense defensive posturing!
Obviously, you don’t understand programming. Programming does not have a strict English proficiency requirement. What is used in programming are identifiers; they merely distinguish variables and have no strict requirement for meaning. You can absolutely use pinyin or arbitrary strings as identifiers. The English level required for programming is only enough to understand reserved words—they’re just basic words.
Obviously, you don’t understand programming.
obviously, you don’t understand Unicode. moth appreciates your wonderful example of irony. it is often those who speak loudest who understand the least.
Yes, it is often those who speak loudest who understand the least, I can’t agree more, because that perfectly describes your behavior. No evidence, No proof, No example, just a viewpoint.
moth expected some attempt at a retort, but moth expected… more than just “no u”. moth assumed people grew out of that after they turned eight.
but moth digresses. moth has no further interest in arguing with a brand new account that already has low rep warning labels next to their name. moth dismisses you.
Thank you for your reply. I may indeed not be good at talking to people who lack logic. I prefer to refute arguments; without arguments, I can’t say anything more.
I may indeed not be good at talking to people who lack logic
you’re just not good at talking, period.
I can’t say anything more.
moth doubts that. you seem compelled to have the last word.
Moreover, no investigation, no right to speak. I write code in a Chinese-language environment every day—so how much code have you written in a Chinese-language environment?
I write code in a Chinese-language environment every day—so how much code have you written in a Chinese-language environment?
sure you do, “Billy”. we both know you’re full of bullshit, but since you made a claim, support it with evidence.
Fine. What proof are you after? Anything I can provide, I’ll be more than happy to shove down your throat. Keep pushing—see where it gets you.
give us a link to your github profile, Billy. one with a long history of code written in chinese. and edit the Github profile with a link back to your Lemmy profile, so that we know you own the account.
also, since you’re more than happy to shove this down my throat, how do you type? do you use pinyin, or a bilingual keyboard? if it’s the former, a short video showing you typing code in whatever editor you use. make sure it’s from one of the projects from your Github. if it’s the latter, then a picture of your keyboard with a handwritten “BillyNaCl” note next to it.
none of this would be unduly hard for someone who codes in chinese to provide for us.
Is it okay if I type on my phone? My computer happened to break, and it’ll take another 3 to 4 days. Similarly, since it’s not very convenient to use GitHub on my phone, I’ll send it to you later. However, most of my code is local; only one or two incomplete repositories are on GitHub. Also, how would you like me to send the video?
Sorry, because my 2FA authentication is tied to my computer, I can’t log in to GitHub right now. If you’re willing to give me 2 to 3 days, I’ll give you an answer that will leave you speechless.
喂喂喂,咋不说话了?刚才不是挺能说的吗?是不是贷款还不完了交不起话费了?哎呦喂,你说怎么我们就没有那么高利息助的学贷款啊?怎么我们上大学这么便宜啊?🤣👉🤡
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:
if 用户.is_active(): return 获取数据()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.
It’s not the govt’s stance, it’s a bunch of random dum dums online led by a guy who thinks his math tutoring skills qualify him to make strategic decisions.




