Skip to main content
GameDev.net gamedev.net
🔒 Locked

How do Japanese program?

Started by JackOfAllTrades Oct 18, 2010 at 3:54 PM 37 replies 13.6k views
Original Post
JackOfAllTrades
JackOfAllTrades
I've been wondering how exactly Japanese and other nationalities program a language like C++ when it's using English characters? Or for that matter how exactly does the internet work for them? I'm guessing that they have their own version of the internet over their but I can't see how they could make entirely different versions of programming languages with completely different syntax for each language...
szecs
szecs
um... They use English?

How do I program in Hungarian?

I don't see any "függvény", "üres", "mutató", "változó", "ha", "amíg", "visszatér", "egész", "lebegőpontos", "igaz", "hamis", "csináld" stb. But I can code anyway...(to some extent)
Rycross
Rycross
Quote:
Original post by SteveDeFacto
Hmmm, so you have to know English to program? Interesting, I suddenly find myself looking down on other none English speaking nations...


No. The keywords used are from the English language, but they are not used in the context of the English language. You can know that "if" in C++ is a conditional branch without knowing what "If" means in the English language.

Variable names and whatnot can and are often declared in the native language, unless international cooperation is required. In the case of Japanese, romaji suffices.
szecs
szecs
Quote:
Original post by Rycross
Quote:
Original post by SteveDeFacto
Hmmm, so you have to know English to program? Interesting, I suddenly find myself looking down on other none English speaking nations...


No. The keywords used are from the English language, but they are not used in the context of the English language. You can know that "if" in C++ is a conditional branch without knowing what "If" means in the English language.

Variable names and whatnot can and are often declared in the native language, unless international cooperation is required. In the case of Japanese, romaji suffices.


Yes. And it's so much fun to look back to my old code sometimes. The mixture of English and mostly Hungarian names is just adorable :')

EDIT: hey, I think I could pick up chicks with that cute code....
fnm
fnm
This reminds me the time when I've read Andrei Alexandrescu's "Modern c++ design" in romanian. I had to translate all the terms in english to actually understand something of that book.
no such user
no such user
There are programming languages that use foreign languages as the basis. For example, there's a Chinese version of BASIC.
10 卜=020 入 水, 火30 從 日 = 水 到 火40 卜 = 卜+對數(日)50 下一 日60 印 卜

(Accepts two numbers and prints the sum of the logs of the range from one to the other.)

And there are programming languages that don't use any natural language as their basis. APL is one nightmarish example.
fastcall22
fastcall22
Quote:
Original post by no such user
For example, there's a Chinese version of BASIC.
10 卜=020 入 水, 火30 從 日 = 水 到 火40 卜 = 卜+對數(日)50 下一 日60 印 卜
Quote:
Translated via Google Translate
10 Bu = 020 into the water, fire30 = water to the fire from the JapaneseBu Bu = log 40 (day)50 the next day60 Indian Bu



Haha, that just made my day.
mind in a box
mind in a box
I "learned" to program in Pascal when I was 9. I was modifying programs my cousin wrote, and luckily he had written some German comments.

I didn't know what all these "repeat", "until", "if", "procedure", "implementation", "using" etc, meant, but I figured out what they do.

One or two years later I was pretty good in pascal.


Let's say: It's easier when you know what the words mean, but it is not impossible without doing so.
Eelco
Eelco
Quote:
Original post by SteveDeFacto
Hmmm, so you have to know English to program? Interesting, I suddenly find myself looking down on other none English speaking nations...


Oh the irony...
Tipotas688
Tipotas688
In Greek schools students need to learn a greek-written language very similar to Pascal for their final exams in order to join university and everything is written in Greek. The other fact is that they have to first learn how to program on just a piece of paper and most stay with that unless they choose to go to a computer science uni :)
Luckless
Luckless
I can't see it being all that hard to write a 'translation' tool, or rewrite the keywords in a compiler to make programming easier for non-English speakers.
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.
owl
owl
English programming sintax *IS* easy for non-english speakers. I remember this logo course I took when I was 7, all the kids got the idea quite easily, and logo commands are not even words.
[size="2"]I like the Walrus best.
LessBread
LessBread
I've been helping a friend who is a native Chinese speaker learn how to program C for a class she's taking at the local community college. Her textbook is in English and she has been having some difficulty understanding the explanations in the book (imo, the book is not a very good intro to C book). I asked a friend in China to recommend a Chinese language programming textbook that she could use to help make sense of C. She got a copy of it and started reading it and immediately began to understand (my friend is very smart). Anyway, one of the things she told me was that before she got the Chinese book, she was having trouble distinguishing between C keywords and ordinary English words in her school textbook. With the Chinese textbook she could see immediately that the keywords belonged to the programming language and not to English.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Rycross
Rycross
Quote:
Original post by LessBread
Anyway, one of the things she told me was that before she got the Chinese book, she was having trouble distinguishing between C keywords and ordinary English words in her school textbook. With the Chinese textbook she could see immediately that the keywords belonged to the programming language and not to English.


Sounds like a bad book indeed. Most programming books use different fonts for programming keywords to avoid such a problem.
klems
klems
I'm assuming OP refers to the way they input characters rather than the language used? Japanese keyboards look pretty much like standard US ones, except they also have symbols for their phonetic scripts on them. To write something with kanji, simply type the word's pronounciation and hit space (or some other key) to pull up a menu where you can then choose the correct characters to use. This is less cumbersome than it seems, since the character combination you want is nearly always among the first three suggested so you don't have to search through a list of roughly five bajillion characters that look like an explosion in a brush stroke factory.

Quote:
Original post by Rycross
Quote:
Original post by LessBread
Anyway, one of the things she told me was that before she got the Chinese book, she was having trouble distinguishing between C keywords and ordinary English words in her school textbook. With the Chinese textbook she could see immediately that the keywords belonged to the programming language and not to English.


Sounds like a bad book indeed. Most programming books use different fonts for programming keywords to avoid such a problem.
The book probably does that, but not being a native user of the Roman alphabet she probably doesn't recognize it. Would you recognize different styles of Chinese characters in a text? When I was an exchange student in Japan and went to apply for a bank account, I had to copy my name from my ID card to the application pixel by pixel in order to make sure the bank clerk didn't get confused about my name perhaps not being the same as the name on my ID.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.