← Back to context

Comment by zabzonk

9 hours ago

I know little about china (except i like the food and art) but do they actually write code in their native language(s)?!

I can only speak for Japan, but I suspect China is the same. In Japan, English programming is the norm because all mainstream programming languages are written in English. Keywords, libraries and documentation are in English, so there's not really any getting around the fact that you have to learn to read at least some English. Some Japanese developers do write identifiers in Japanese where languages support it, and documentation / comments are often written in Japanese, of course.

I, personally, think this is a lamentable state of affairs that raises the barrier to entry for programming, especially for children. There are education-oriented Japanese programming languages that try to fill the niche for teaching children, but I think it would be beneficial if there were serious languages with a full ecosystem rather than ones designed to be training wheels before learning English programming languages.

  • Why not use a pre-processor or something like it to simply translate the keywords etc? I know that there isn’t a 1:1 match between English words and words in other languages, but you should be able to get something close enough.

    • I actually have done that, but there are still problems. It doesn't really do anything to help somebody who can't read English because things like error messages and libraries are still in English, and it doesn't play nicely with IDE tooling, which is fixable in open-source editors but not proprietary editors. It ends up being a lot of effort for an experience that feels very much second-class.

The first STM32 "bluepill"-based SCSI to SD adaptor I ever used had all its source code in Chinese.

Google Translate did a not terrible job of turning all the comments into English but also mangled the code in exciting new ways, but with a bit of ingenuity to apply the Artificial Intelligence translations, and a bit of bloodymindedness when applying the Analogue Idiocy to hacking it all about with search-and-replace, I got a pretty plausible translation of it.