39

Do they code in Latin?
Do they have their own programming language?

I'm just curious.

Svante
  • 46,788
  • 11
  • 77
  • 118
darkrain
  • 965
  • 4
  • 13
  • 23

8 Answers8

24

I maintain the Korean IME (Input Method Editor) for Microsoft Windows and Office. Thus I work with Korean devs on a daily basis, Japanese devs regularly, and Chinese devs occasionally. We all code in C/C++.

I am most familiar with the code for the Korean IME. There are a few places with comments in Korean script (Hangul) where it is absolutely necessary, but even most comments are in English.

This may be because we are an international company, so we all need to communicate in a common language. Even emails are usually sent in English. However, when I verbally speak with my Korean co-workers, it's almost always in Korean.

Although C/C++ reserved words are also "English" words, they have their own very specific meaning and end up becoming part of a language that isn't even really "English," per se.

edit: Incidentally, I was just listening to the stackoverflow podcast (#29, I think) where a similar question came up. Joel said the scripting language in Excel was localizable (reserved words changed to the local language.)

Leftium
  • 10,906
  • 6
  • 51
  • 75
13

To answer the exact questions asked: For the most part, they code in "English" (that is, they code in the exact same version of the programming languages used in the U.S., with English-based keywords and so on). However, there are some programming languages that cater to Chinese to varying degrees. As one commenter mentioned, ChinesePython is one.

However, I think there is more to the endeavor of programming than just producing source code. For the perspective of someone who has lived in Shanghai for years and worked with programmers there during that time, I think this blog article is an extremely good one.

For further references on Stack Overflow, not necessarily about Chinese in particular:

(The deleted posts are not visible to users with less than 10000 rep.)

Also, on Software Engineering SE (formerly Programmers SE):

John Y
  • 12,718
  • 1
  • 44
  • 70
  • 2
    The host for your blog link seems to be down, so I have replaced your link with the Internet Archive's copy. – merlin2011 Dec 08 '15 at 09:01
5

Why would they use any other tools like we do? I'm german myself and don't program in german either. But a good question.

Henrik P. Hessel
  • 35,062
  • 17
  • 77
  • 99
  • 3
    This is chinese python : They have a complete translation of the language : #!/usr/local/bin/cpython 回答 = 读入('你认为中文程式语言有存在价值吗 ? (有/没有)') 如 回答 == '有': 写 '好吧, 让我们一起努力!' 不然 回答 == '没有': 写 '好吧,中文并没有作为程式语言的价值.' 否则: 写 '请认真考虑后再回答.' – darkrain Aug 02 '09 at 21:47
  • I got your point, but why should "limit" myself. German programming resources are bad as hell compared to stackoverflow.com or any other coding platform like codeplex. – Henrik P. Hessel Aug 02 '09 at 21:52
4

In mainland China at least virtually everyone of an age to be getting a job programming already knows Pinyin--a version of their language set into our alphabet. Also, you have to know it to type anything into the computer as that's how the input editor works.

Thus it seems to me a trivial step to use the standard keywords--why in the world would they make a different version of the language in order to get around this?? The inconvenience of their code not being interchangeable would far exceed the tiny advantage to not having to deal with reserved words not in their script.

Loren Pechtel
  • 8,549
  • 3
  • 27
  • 45
4

The Chinese and other cultures I have come into contact with all code in English. I live in Vietnam and they still use English here; even for all the variable names. On occasion you will see Vietnamese comments, but for the code itself.. all English. This makes sense when you realize that the majority of online resources are in English and the fact that sharing code with people of other cultures becomes easier too.

Matt
  • 6,353
  • 8
  • 52
  • 100
2

I've got two native Chinese speakers on my team - I'll ask them personally on Tuesday if you don't get a good answer by then, but here's my initial guess.

Code is written in the standard programming languages, although comments (and perhaps variable names) could be written in Chinese. No use re-inventing the wheel (where "the wheel" is C++, Perl, Python, etc.) when you can just learn a few keywords.

Chris Simmons
  • 1,823
  • 1
  • 12
  • 18
  • 2
    This, pretty much. I've seen the work of a couple of french programmers; it's uses the same programming languages as well do, just a lot of french comments. ;) – Amber Aug 02 '09 at 21:49
  • after I've got a polish documentation, I've started to comment in english, too. – Henrik P. Hessel Aug 02 '09 at 21:53
  • 1
    The interesting things happen when you mix english keywords (in right to left script) with e.g. Arabic identifiers (left to right script). – Paul van Brenk Aug 02 '09 at 21:53
  • @Dav : we even sometime use english for comments ^^ for instance, when posting code samples to stackoverflow :-p (and when we are working on OSS project with contributors from all arround the world, or on projects for big multi-national companies, or when it's policy, or, ...) – Pascal MARTIN Aug 02 '09 at 21:57
  • I once coded comments, or even identifiers in French. Hey, even MS Office's VBA was translated in French... I have abandoned the practice long ago: even for my personal projects, I took the habit to write everything in English. – PhiLho Aug 02 '09 at 22:03
0

Most of the commonly used language are English-based, and most of them are so to appeal to an international audience. Some countries do actually have their own personalized/localized programming languages. Here is a list of some of them: Wikipedia: Non-English based programming languages

Looks like there is a version of BASIC called Chinese Basic. I'd be surprised if it's used on the same scale as other widely used languages at the moment :)

Kieveli
  • 10,548
  • 6
  • 48
  • 77
0

Most Chinese people just code in the same way as rest of the world, using those common programming languages, at most with some Chinese comment or romanized Chinese variable name.

There are also some programming language being created/translated into Chinese, see https://en.wikipedia.org/wiki/Non-English-based_programming_languages or https://en.wikipedia.org/wiki/Chinese_programming_languages , but as far as I know nearly all of them aren't used more than those language in http://code.tutsplus.com/articles/10-most-bizarre-programming-languages-ever-created--net-2412 except one: EPL Easy Programming Language, which is a programming language that apparently based off VB and allow user with no English knowledge nor programming knowledge to learn coding quickly and let them easily produce some simple programs. Now it is predominately use by those with little foundation to develop things like game cheat and malware...

user930067
  • 268
  • 3
  • 10