About the Russian language in programming – InformTFB

About the Russian language in programming

About the Russian language in programming

Introduction

I’ll start with the little things. Is it convenient to organize a typical keyboard layout change now? In the sense of switching to Russian/Latin? In my opinion, smartphones are more convenient. Do not press all these “Shift” and “Alt”at the same time. On my first home computer “Electronics-901 “(aka ai-PC16) , there were even two special “empty” keys approximately where the”windows” keys are now. One switched to the Russian layout constantly, and the other-temporarily (for the time of pressing). It’s much more convenient. However, the most convenient option of switching at one time I made myself from a massive pedal from a sewing machine “Tula”, simply connecting it with two wires to the DTR and DSR contacts of the RS-232 connector. In this case, if you programmatically set the DTR bit to “1”, the presence of a DSR signal means that the pedal is pressed, otherwise it is released. Switching the layout without hands turned out to be very ergonomic. Alas, as new interfaces spread, RS-232 gradually came to naught and now there is simply nowhere to connect the pedal in the laptop.

By the way, I give the idea to companies that produce all sorts of USB nonsense, like a plastic chameleon that periodically sticks out its tongue: to release a USB device in the form of a pedal, when pressed, which emulates the pressing of user-defined keys. True, there is already a USB steering wheel with pedals, but there is still a lot of excess. The most obvious use of the new simple device is to switch the keyboard layout without using your hands.

To be fair: some keyboards have a separate toggle key (usually a globe is drawn on it). The problem is that many other computers don’t have it. In the ancient text editor “sidekick “I even once used both keys” Shift”, because they are always there: the right one switched constantly (and therefore as” Shift “did not work at all), and the left one-temporarily, the first two seconds as” Shift”, and only then as a switch. The point is that you can then print, for example, in Russian, then hold the little finger key, one word in English, then let go again and continue in Russian.

But, I repeat, cumbersome switching is a trifle, not a problem, but rather a consequence of the attitude to the use of the Russian language as something secondary and not worth attention. Although this little thing is no-no, and will remind you of yourself, at least in the form of a fashionable, but stupid abbreviation KYVT (instead of RSDN) on the site’s forums RSDN.RU.

The real problem, in my opinion, is the appearance on the same computer forums of discussions on the topic: “does the Russian language interfere with programming”. From the point of view of the part of Russian programmers who work in Western firms or have set themselves such a goal (with a possible and desirable departure abroad), the Russian language in programming is really evil, an additional barrier that prevents them from adapting faster in the English – speaking environment. Russian Russian is not the language that hinders them in programming, but the Russian language in general, it seems to me.


Natural use of the native language

Language is inextricably linked to thinking. For example, when I write the text of a program, I involuntarily mentally pronounce the required action. Of course, it does not sound like Levitan’s voice inside, and even it is not always exactly sounds, but something like: “if both a and b are zero, then we leave” flashes through my thoughts. In a typical modern programming language, I should express this idea in the form of a program text somehow like this:

if (a==0 && b==0) return;

That is, I mentally pronounce “если”, “уходим”, but I still have to write “if”,”return”. Imperceptibly, you have to translate all the time, even in the simplest form. Therefore, it is more natural for me to write the same operator in the form:

если a=0 и b=0 тогда возврат;

That’s exactly what I write. And this is not a pseudocode at all, but a real language operator [1], where keywords have Russian equivalents, you do not need to distinguish between assignment and comparison (and, therefore, you do not need to double characters), and logical operations can be written simply as And, OR, NOT. The operator has become more like a mental phrase and the translation from “mental Russian” to “program English” is no longer required.

For a person who has been programming for a long time, probably all this seems insignificant and unusual, since from the very beginning he learned to compose a program text as a sequence of special characters and words that are not related to his native language. Yes, the programming language will never coincide with the native language, but at the stage of development (for example, in school), elements of the native language are very helpful in understanding the recorded actions. There are more of those who quickly grasp the essence and fewer of those who immediately lose interest in learning programming because they encounter chains of incomprehensible hieroglyphs and foreign words.

For example, when my wife was studying at the Moscow Mathematical Technical School, they were taught the basics of programming using a special language (something like pseudocode), which was called: Russian Algorithmic Language, abbreviated RAYA. (Funny. It turns out that in our family, the wife is familiar with the language of HEAVEN, and the husband with the language of Hell). In my opinion, this was a wise move. The native language, of course, is not a panacea and did not provide the release of superprogrammers, but the fact that it contributed to a deeper understanding of the basics at the most important initial stage is undoubtedly.

That’s exactly what I write. And this is not a pseudocode at all, but a real language operator [1], where keywords have Russian equivalents, you do not need to distinguish between assignment and comparison (and, therefore, you do not need to double characters), and logical operations can be written simply as And, OR, NOT. The operator has become more like a mental phrase and the translation from “mental Russian” to “program English” is no longer required.

For a person who has been programming for a long time, probably all this seems insignificant and unusual, since from the very beginning he learned to compose a program text as a sequence of special characters and words that are not related to his native language. Yes, the programming language will never coincide with the native language, but at the stage of development (for example, in school), elements of the native language are very helpful in understanding the recorded actions. There are more of those who quickly grasp the essence and fewer of those who immediately lose interest in learning programming because they encounter chains of incomprehensible hieroglyphs and foreign words.

For example, when my wife was studying at the Moscow Mathematical Technical School, they were taught the basics of programming using a special language (something like pseudocode), which was called: Russian Algorithmic Language, abbreviated RAYA. (Funny. It turns out that in our family, the wife is familiar with the language of HEAVEN, and the husband with the language of Hell). In my opinion, this was a wise move. The native language, of course, is not a panacea and did not provide the release of superprogrammers, but the fact that it contributed to a deeper understanding of the basics at the most important initial stage is undoubtedly.

Reasonable usage limits

Attempts to turn the programming language into a national language or, conversely, to get rid of national features in the program text were made more than half a century ago. I mean the Cobol and APL languages.

The Cobol language assumed that the program could be written simply in English. Therefore, it had a large number of reserved and even “noise” (optional) words. But nothing good came of it. The text of the programs still turned out not in English, but in broken English, and their analysis became more complicated. Similarly, it will not be possible to write programs in any other “real” language, for example, Russian, since the usual language will never be identical to the program one. However, the presence of a certain set of words and their frequent combinations in the native language still improves and intuitively facilitates the understanding of the program text, because, after all, a person is not a translator scanner and does not analyze the text character by character.

The other extreme was represented by the language of the submarine, which had a large number of special characters for all operations. The recording of the program on the submarine looked like the records used by mathematicians. The submarine remained in history famous for the fact that a program written on a single line, i.e. no more than 80 characters, could be analyzed for hours, i.e. it took a long time to figure out what, in fact, it does. It turned out that in addition to the authors in such programs, no one could understand at all, and the idea of super-compact recording with a large number of special characters was abandoned.

In my opinion, program texts should have a middle ground between these extremes. They, of course, should not be too verbose and this is reminiscent of old cookbooks, but also charades of chains of icons and brackets (you can remember Lisp, where there were up to twenty brackets in a row) this is also not ideal. And if the program text still uses not only icons, but also words, then it is better that they are in their native language.

Experience in the use of the native language

If we turn to my own experience of using my native language, I think that I was even lucky to some extent: the period of training and mastering came at a time when the Russian language was used not that widely, but quite naturally, since software and hardware of domestic development were used. As a programmer, I started with BESM-6, the OS-Dispak operating system, the BESM-ALGOL translator and the dialog program “Remote” (while working at the VT-340 terminal was very similar to working at the first personal computers). In those days, even in the code table, the Russian alphabet was first used, and then Latin letters that differ in spelling from the Cyrillic alphabet. All documentation was, of course, in Russian, for example, in the description of the BESM-6 commands, all the abbreviations of the commands were in Cyrillic, there was no “MOV”or ” JMP”.

Unlike the EU-COMPUTER, everything remained “Russian-style” in the direction of BESM (and “Elbrus”). However, until the development of the Dubna nuclear center appeared-the Dubna monitor system, which included an assembler (then such languages were called autocodes) with the strange name “Madeleine”. Since the translator first translated to it, some error messages were issued at the assembler level. And they were all in English! It turned out that one of the Soviet programmers wrote a message to other Soviet programmers are not in their native language. Of course, Dubna was originally designed to work together somewhere at CERN, so there was everything in the “international” version. But it was delivered to us as a domestic system and at the same time unceremoniously “moved away” from the native language. For example, the command abbreviations in “Madeleine” were not the same as in the original documentation for BESM-6, which caused misunderstanding and irritation.

A few years later (for me in 1987), in terms of the native language, everything turned upside down with the advent of American personal computers. Objectively and naturally, at first there was no Russian language in principle. But since this was required for typing, it was still necessary to adapt them to the native language. That is, I had to flash the ROMs of video cards, paste Cyrillic translation images on the side walls of keys, learn to write keyboard drivers, simultaneously getting used to the abbreviations of the x86 command system. Very soon, the” Russification ” of computers and printers was already being done in many organizations that have PCs, and the matter was literally put on stream. But at the same time, no one usually engaged in the “Russification” of the translators received together with the computers, at best only the manuals were translated.

Perhaps I was one of the first to take care of this, and then only because the translator from the PL/1 language received together with IBM-PC/XT did not allow me to write even comments in Russian: all characters with a code greater than 7FN were perceived by it as controls. Because of this, at first the comments looked like the current SMS “in Russian” from phones that do not have the Cyrillic alphabet. But it was completely unacceptable for me to develop programs without using my native language. The first fix of the translator, which allowed the Cyrillic alphabet, was very easy and led to the idea of disassembling the entire translator to become the full owner and gradually make it entirely “Russian”. Given that PL/1 does not have reserved keywords, you can have two variants of words at the same time: English and Russian. Therefore, the programs already written could be left “English”, but new programs could be written already “in Russian”.

Subsequently, many improvements were made to the translator, given in [1]. For the “Russification” part, Russian keywords were added, including And-OR-NOT instead of the “&”, “!” and “~”signs. This translation of logical operations into” Russian ” immediately made the program texts much easier to perceive. Diagnostic messages have also been translated and expanded. How many modern software tools exist that issue error messages in Russian? But this is the first thing that beginners face. It can be hard enough for them to figure out what exactly caused the error, and then there are messages that are not in their native language. So often even quite intelligible messages start to seem the same: “the translator swears”, and the spelling in the text is a haphazard way, without regard to any received message.

As a result of all the changes in the native language, I almost returned to the software world in which I worked before the PC era, the program texts began to look even better. For example, when writing a program (except for the names of imported subroutines, all these getenhmetafilepaletteentries that look like “Chinese letters” in the Russian text») I can practically not switch to the Latin alphabet at all. Of course, I always try to give identifiers meaningful names in Russian.

But most programmers of my generation switched to languages with C-shaped syntax and practically stopped using Cyrillic in program texts.

Conclusion

At first glance, it seems that there are no problems with the Russian language now. Indeed, operating systems, office programs and games have long been “localized” into national languages, and the Cyrillic alphabet is applied to the keys in the factory way. But if you turn to programming, then the Russian language is almost completely replaced. Of course, there are exceptions, for example, “Accounting 1C”. At the same time, I do not in any case call for creating specially “Russian” programming languages (wits will immediately add: “Orthodox”). Let me remind you that even in the very first international document on the programming language [2], it was assumed three levels of representation: reference, language publications and specific performance. That from the very beginning it was assumed that “the signs of language can be different in different countries, but it should be saved to-one correspondence with the reference performance.”

I myself use the PL/1 language, created in the West (mostly in the UK), the presence of a ready-made translator from which was at one time even one of the arguments for the decision to copy the IBM 360 in the form of an EC computer in the USSR. But, perhaps, the decision justified at that time in its software part was not further supported by the development of the originally copied “standard”. Of course, now from the position of post-knowledge it is easy to advise what should have been done then. However, even then it was clear to many: “the lesson of mastering the EU OS is clear: you can, and sometimes you need to master individual samples of foreign software, but you can not take the path of constantly following them” [3].

My experience as an amateur enthusiast (without a specialized education) shows that it is not so time-consuming to understand the existing compiler. A team of 4-5 people somewhere in Akademgorodok would do this quickly and efficiently, for example, with the IBM compiler for PL/1. That is, they would disassemble it and learn how to translate and assemble an exact copy of the source. And this had to be done, of course, not for “Russification”, but in order to become the owner of the translator and from this launch pad to continue its development further, already independently of anyone, supplying the army of EU computer users with a high-quality and, most importantly, improving product. And translating the compiler and other utilities into Russian would be just a bonus, making it easier to maintain and use. But the translator from the PL/1 language to the EU computer was never “mastered”. I make this conclusion because it was never “Russified”, although there were attempts to develop the language [5].

I “mastered” the translator and made “Russification” already for the PC version of the language, and the cost of translating into Russian was negligible compared to other improvements to the translator. And thus it happened that the “specific performance”, which coincides with the reference because the result of translation in object module does not differ from the result of the translation of the source program text in “reference” form. And, by the way, the simplest “translation” can always be returned to the” reference ” representation of the source text of the program, i.e. such representations are reversible.

Another argument against using the Russian language in programming is the claim that using English words turns languages into universal scientific ones, like universal mapping in mathematics or, for example, in chemistry.

However, in my opinion, programming languages have much more in common with ordinary languages than an abstract mathematical or chemical representation. If a person thinks “in Russian”, in most cases he will never start thinking “in English”. By prohibiting the use of elements of the native language when learning the basics of programming, we initially put our schoolchildren and students in a lagging position compared to their English-speaking peers.

But there are already generations of programmers who believe that this is how it should be. There was even a paradoxical point of view that not using the native language is just our advantage over English-speaking programmers, because the actual constructions of program operators are not similar, for example, to the text of comments, but, they say, they all mix it up. According to this logic, we should suggest that English-speakers use Russian keywords in their programs in order to “catch up” with us, so to speak. And it is better to immediately switch to Chinese characters, so that everyone (except, of course, the unfortunate Chinese) has this advantage of the source code being different from their native language .

The use of the Russian language also reflects the general state of affairs in the development of programming. While the USSR was developing its own software, the Russian language was also used, for example, in such an outstanding project as “El-76″, where large forces of the whole country were involved: a number of universities, including Tallinn and Chisinau, participated in the development of software for” Elbrus”. De

Valery Radokhleb
Valery Radokhleb
Web developer, designer

Leave a Reply

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