⬆️ ⬇️

Russian language specification Java

I was faced with the need to translate material related to the Java language. Moreover, the translation should be made not for oneself, but for general use, so to speak. Therefore, it should be as close as possible to the original and made in accordance with the requirements of the language specification. As it turned out, these two requirements do not always mean the same thing. Well, firstly, the original itself allows itself a rather loose treatment of terms, “but this is so trivial,” and secondly, once again I had to deal with discrepancies in the Russian interpretation of Java-language terms. And this, in my opinion, is already quite a big and long-standing problem.



To begin with, in the Java language there are terms such as operator, operation, operand, and statement. By virtue of an established tradition, in Russian-language translations the term operator is often translated as “operation”. For example, in the first volume of Horstman we read: "Operation / means integer division." And this is not an isolated example, but a common practice. Well, let the Russian-language translations combine the notions of operator and operation, although this contradicts the requirements of the specification and the dictionary: "Operators are special symbols for each one, two, or three operands, and then return a result . " However, let's go further.



The next well-established stamp is the use of the term "operator" as a translation of the notion of statement. And here the problem is more serious: we have two completely different concepts intertwined, and such a free interpretation causes already certain discrepancies and contradictions concerning the foundations of the language and, therefore, affecting its understanding in general.

')

In terms of specification: “Statements are expressly language. A statement forms a complete unit of execution " and these include all our" operators "including branches, cycles, etc. Although in the specification they are referred to as statements.



Now, having read, for example, translated literature, you will already be somewhat puzzled, referring to the original sources. But that's not all. Let us turn, for example, to the operator (or are the instructions?) Switch:



switch (choice) { case 1: . . . . break; case 2: . . . . break; case 3: . . . . break; case 4: . . . . break; default: //  break; } 


Can you define the terms used here: switch, choice, case n (separately for case and separately for n), default, break? For example, how does the translator of the same Horstman imagine it:
Execution begins with the case branch label corresponding to the value 1 of the choice variable, and continues until the next break statement or the end of the switch statement.
. Personally, my wording
corresponding to value 1 of choice variable
enters into a stupor, although, of course, you can guess. But this is not important. It demonstrates the well-established tradition of translating the term statement with the word "operator", making some confusion with respect to its English-speaking fellow. As for the question posed, here’s how the specification interprets it:



switch - statement;

choice - expression;

case - switch label;

n - case constant;

break - statement;



→ Official language specification



Now about the traditions of translation. Apparently, they were formed at the dawn of programming in the Soviet Union, and later they moved from language to language. As far as I know, the first attempt at the Russian-language translation of the Java language specification was made in 1999 . But, again, as far as I know, it was not printed. It, in fact, paid tribute to the established traditions, which were mentioned above. However, in 2015 a printed translation finally came out . And here, the meaning of the terms turned out to be revised, and in my opinion, more consistent with the official English-language specification . Although, as it seems to me, there is also something to complain about. In this edition, operator has the meaning of "operator", statement - "instruction", well, etc.



I would very much like to know the opinion of experts, since the question, in my opinion, is not idle, because it concerns the foundations of the language on which its foundation and correct understanding is built. In addition, related questions may, for example, meet at certification exams, which, as you know, try to pass in the original language, well, and simply in communication programmers who can imagine differently the meanings of certain terms. Or maybe there is an official Russian-language edition of the Java language specification? In any case, for his release has accumulated enough differences. After all, the foregoing concerns only individual examples, of which there are undoubtedly much more.

Source: https://habr.com/ru/post/330624/



All Articles