Categories
Uncategorized

The translation of “Programming language ‘Japanese'”.

   Hi, guys, I found this article on the Net, which the original author seems to have written in 2004 April. At my reading, I was in stitches. I want to share this experience with you, so translate it (^o^). Can you get what fun this is by my translation? Well, I’ll try it……

   Let’s read the translation of “Programming language ‘Japanese'”.
      * [1][2] in the following text are added by me.

————————————————————————————————————————————————

Programming language
“Japanese”
April 2004
Leshade Entis

■ Introduction

  

   Japanese is one of the oldest classes of programming languages in the world, which was invented by the ancient Jomon1 people about 10,000 years ago. (※)
   Japanese is originated on a system of ancient northern and southern languages, the language is quite unusual because it possess both flexible syllable structure and powerful macro systems from the ancient northern and southern languages.
   Besides, Japanese specifications have changed and extended over and over for about 10,000 years. So, it becomes to have the unique features in the process.
   These unique features give advantages to Japanese language, at the same time, obstacles to its learning.
   This document is for the people who begin to learn Japanese as a programming language, and gives explanations about its relatively common syntax which they are sure to know.

※ If I write just to be sure, this document is an attempt to say a commentary as the programming language “Japanese”, and have fun clarifying the meaning of the words we usually use without considering.

■ Disclaimer

  

   Please use this software under your responsibility. I have no responsibility for the damage caused by the software.
   If you cannot have responsibility for the results, I ask you to refrain from using the software.
   In addition, I verified the behavior of the software on the latest Japanese compiler.
   As a result of using the software, your condition is getting discomfort or worse, it is possible that there are some problems with your Japanese compiler. Please update to the latest Japanese compiler in such cases.
   However, please update it under your responsibility in the case.

■ Outline of the programming language “Japanese”

  

   “Japanese” has the following features.

◆ Powerful macro

   A lot of particles and auxiliary verbs characterize some features of Japanese.
   The particles and the auxiliary verbs make a statement more flexible. For example, word order of Japanese is quite loose. This is the result of a macro formed by the particles and the auxiliary verbs.
   More generally, the particles or the auxiliary verbs function like a container of syntax.
   By taking this macro advantage, you can compile other languages by simply replacing the macro definition file of the Japanese compiler.

     

Original:        I feel blue.
After processing:  ミーはブルーをフィールする。

  

◆ Flexible syllable structure

   Japanese syllables are considerably simplified and their combination has a lot of flexibility, which is one of Japanese features.
   Besides, each sound has the image and meaning, you can easily create the word of your own. About a mimetic word, it is most notably.
   Though a mimetic word does not imitate a real sound, its sound has a meaning. You can represent a situation delicately by their combination.

     

Example:  はにゃ~~~ん

  

   This feature is very powerful, so you can consist a statement only using mimetic words combined with macro. (※)

     

Example:  ごぉごぉざぁざぁびゅうびゅうの中を、とぼとぼ行ってたら、ふにゅ~~でぬめぇ~~~っとしたのがうじゃうじゃしてたし、さっきはブーブーがダー、バ シャっで、もうびしょびしょでくたくたで、ふえぇ~~~~んって感じ。

  

※ Heavy use of mimetic words usually gives lower-class impression, but, you’ll find the interesting thing when writing down everyday conversation into sentences.

  

◆ Advanced abstraction and hiding

   Japanese can describe the state of one’s mind and delicate things, on the contrary, it can make an abstract description for the subject.
   Especially, a modifier about degree expression is highly abstracted.
   This is a very unique feature of Japanese comparing with other languages. Japanese compiler guesses the feelings of a programmer and automatically selects the optimum parameters, so the programmer has no need to describe how degree in detail.

■ Main syntax

  

   I’ll explain the syntax that is often used in Japanese.

◆ “dōmo (どうも)”

   There are various usage “dōmo (どうも)”.

<dōmo statement>

   The statement consists of only “dōmo” is called “dōmo statement” and doesn’t do anything.
   On the old single-task system, you can control the timing by using “dōmo” over and over, but, on the multi-tasking system you have to synchronize it by “dōmo prefix” described below.

     

Example:  どうも、どうも。

  

<dōmo prefix>

   By writing “dōmo” to the beginning of the statement, you can run its following statements in a special synchronization state.
   Usually, a Japanese compiler generates a code to maintain a certain implicit synchronization state. So, you can generate the code that works without everything written in detail.
   The “dōmo prefix” analogizes the context more deeply and automatically complements the processing content. So, the programmer has no need to describe the statement exactly. This synchronization state is called “dōmo synchronization”.

     

Example:  どうも、すいません。

  

<Variable or function name>

   You can use “dōmo” as a variable or a function name that don’t have a special meaning.
   This “dōmo” itself has no meaning.
   However, in a particular system you need more attention because “dōmo” might be reserved as the name of the NHK mascot[2].

<Type about “dōmo”>

   “dōmo” does not identify the type.
   Usually, “dōmo” is used as a pointer.
   You can assign any kind of pointer to the “dōmo” pointer.

◆ “yoroshiku (よろしく)”

   “yoroshiku” is an instruction that tells the act accordingly.
   For example, the following statement;

     

どうも、よろしく。

  

a function and this statement are equivalent. The function automatically selects a procedure set to realize what an object wants. The object is assigned to the “dōmo” pointer and itself knows what it wants. Then, it runs in a state of maintaining synchronization “dōmo synchronization”.

◆ “īimide (良い意味で)”

   “īimide” is a kind of pseudo-instruction.
   “īimide” itself is not executed, but tells the compiler how to interpret the following expressions.
   In Japanese, an expression default attribute is “waruiimide (悪い意味で)”. So, you don’t need a pseudo-instruction “waruiimide” usually.
   After your declaring “īimide”, the compiler interprets the following statements as “īimide”.

     

Example:  良い意味で競争する。

  

◆ “osewaninatteorimasu (お世話になっております)”

   “osewaninatteorimasu” is a kind of declaration statement, to which a compiler feels obliged.
   The compiler feels obliged won’t interpret the following program maliciously.

◆ “shitsureishimasu (失礼します)”

   “shitsureishimasu” is a kind of declaration statement, which you should declare in advance when you might be rude.
   You declare the statement in advance, and, you can code the program without being rude to the compiler.

◆ “otsukaresamadesu (お疲れ様です)”

   “otsukaresamadesu” is a kind of declaration statement.
   When you are too tired to think of any other declaration statements, the compiler takes care of it in the right way if you declare “otsukaresamadesu”.
   It’s much better to leave it with “dōmo”.

◆ “moshi (もし)”

   If you want to write a “moshi” statement, you use this with conditional options in advance.
   In most cases, you write “moshi” statement before you code a delusion that is inconceivable.
   You need a lot of attention when using a “moshi” statement, because most of Japanese compilers don’t fully support “moshi”, so it may produce incorrect results.
   In some cases, you can avoid this problem by using a “īimide” instead of the “moshi” statement.
   Even if a compiler supports the “moshi” statement, many of which are incomplete implementation. As a result, in many cases, the compiler cannot correctly run when you write a complex conditional expressions with binding multiple conditions.
   Most notably it is the error message “setsumeigatarimasen (説明が足りません)”.
   When you get this error message, you had better not re-make more complex conditional expressions for accuracy and rigor. Because the error message itself is an error. This only shows you the compiler cannot understand the complex conditional expressions.
   This problem is rooted in its education. But you cannot solve it at this point.
   In some cases, you may be able to avoid this problem by the following methods. First, you divide a long complicate “moshi” statement into several simple statements. Second, you simplify the conditional expressions written on each “moshi” statement.
   When the methods don’t work, to take the appropriate synchronization by inserting some “dōmo” between “moshi” statements might make you avoid the error.

◆ “kentōshitemimasu (検討してみます)”

   “kentōshitemimasu” statement spools the tasks.
   The spooling tasks should be executed one by one. However, in fact, most of them are discarded before execution.

◆ “tameshitemimasu (試してみます)”

   “tameshitemimasu” is a kind of declaration statement, which you should declare in advance when you code a procedure set which might return a lot of errors.
   After your declaring “tameshitemimasu”, an error exception handler should help you even if any temporary problems are returned.
   Like “moshi” statement, most of Japanese compilers don’t support “tameshitemimasu” statement, neither.
   On such a system, “tameshitemimasu” statement does not mean anything, if a problem occurs, the process stops forcibly whether the recovery is possible or not.
   Therefore, when you use “tameshitemimasu” statement, you need to check the compiler supports it before to start.
   When your compiler does not support “tameshitemimasu” statment,you never describe innovative or challenging things and must always be careful to precedent and customs.

◆ Final particles, “wa (わ)” “ne (ね)” “aru (アル)” “nyo (にょ)”, etc.

   In Japanese, you can describe a final particle at the end of the statement.
   A final particle usually expresses emotions, but recently, it is used for emphasis on readability, and often distinguishes the type of an instance explicitly.
   The following examples are the same method of the different instances.

     

Examples:
    良い天気ですわ。
    良い天気ね。
    良い天気アル。
    良い天気にょ。

■ The helpful knowledge in Japanese programming

  

   Last of all, I’ll write some helpful knowledge in Japanese programming.
   You can code a good program if you are aware of the following points.

◆ Describe expressions vaguely

   In Japanese programming, to describe an expression exactly is senseless.
   Let you describe it vaguely.
   And then, the compiler, the interpreter, or the run-time system will run it properly.

◆ Out of sight, out of mind

   Generally, you should not write that it is considered “evil”.
   An exception error occurs when the “evil” code which you wrote unthinkingly has run. You should avoid such an code which can cause the system stop in some cases.
   If you want to describe the “evil”, you need to write avoiding “evil” rather cleverly. By not dare describe, the compiler or the interpreter are to guess your intent.

◆ Attempt a description by passive form

   Modern times, in particular today, the mainstream of Japanese programming is the description by passive form.
   Describing statements by the passive form, the program behaves as if it has no relationship with its results and takes an objective perspective with no independence.
   By this, you, the programmer, can feel escaping responsibility for the results.
   Recently, it is the style of mainstream that your responsibility as the results passes onto the compiler, the interpreter or the rum-time system.

◆ Not adding spaces between the words

   You never add spaces between the words, with an emphasis on readability.
   A space has a meaning in Japanese. When you add a space carelessly, the space gives the unintended meaning to your statements, so you should be very careful if you add a space.

◆ Syntax error is recommended

   If you don’t know how to describe exactly, you try to describe it without thinking.
The compiler or the interpreter get your concerns from syntax errors, then, they will return heartwarming error messages to you.

Copyright (C) 2004 Leshade Entis. All rights reserved.

————————————————————————————————————————————————
   The original article title is “プログラミング言語「日本語」” by Leshade Entis. He is surely a native Japanese speaker, I think. If you have feelings of curiosity, visit and read it in Japanese!!

Leave a Reply

Your email address will not be published. Required fields are marked *