Writing code in Russian. Pros and cons of such a programme. - page 4

 
Nikolay Demko:

No problem, the 47th chromosome is power.

OOP was created by the smartest people, professors. They spent years refining and modifying it to suit the needs of programmers, so that it would be most convenient to write programs.

MQ's OOP is also refined in terms of code safety.

Do you want to become a prophet of a new religion? No problem, after all, it is your time.

Everyone is free to program as he likes. Just wanted to find out what has been unclear to me for a long time...
 
Alexander Antoshkin:

If the world is crooked, then my mind is crooked, but I do not see in this relative turmoil not ideology, not worldview

but to the assholes around me, a rod, to make them resign themselves to their doom. )))))))

What are you talking about?
 

Russian variable names can turn into abracadabra at some point and there's nothing you can do about it. This way it's impossible to find out which variable is which. Using names of variables in Cyrillic seems very dangerous.

But the other day I was surprised to find out that not only input variables have a comment after the variable. If after the declaration of a variable I put a comment in the native Russian language, then when I type this variable I get a hint what it means.

Something like this

int ticket1 = 0; // Это тикет ордеров на покупку.

here is what we see.


Maybe it's better not to take the risk?

 
Alexey Viktorov:

Russian variable names can turn into abracadabra at some point and there's nothing you can do about it. This way it's impossible to find out which variable is which. Using names of variables in Cyrillic seems very dangerous.

But the other day I was surprised to find out that not only input variables have a comment after the variable. If after the declaration of a variable I put a comment in the native Russian language, then when I type this variable I get a hint what it means.

Something like this

here is what we see.


Maybe it's better not to take the risk?

Strange... I was programming entirely in Russian for three years and this never happened... May be some old build?
 
Реter Konow:

The principle of my approach is as follows:

1. we index calls to software functions. We divide the functions themselves into those that check events (logical functions, - return yes/no), procedural functions (executive functions), and computational functions.

2. Create a logical kernel as a global three-dimensional array. Here we assign indexes of logical functions in a certain hierarchy (separated according to the importance of events that they check: global and local events). We create a kind of perimeters of these events in the kernel field.

3. We index procedural and computational functions at the ends of logical chains.

4. Create a logic engine that loops around the perimeter events in the kernel at timer frequency and calls the required functions via their indexes.

5. Rebuild the program will only consist of rebuilding specific logical chains or building new ones.

Imagine what this code will look like on your kernel:

#include <Math\Alglib\complex.mqh>
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   complex a; a.re=3; a.im=2;
   complex b; b.re=1; b.im=4;

   a+=b; // тут мы складываем два комплексных числа а и b, и присваиваем результат в а

   Print("a(",a.re,":",a.im,")");
   Print("a(re:im)");
   
  }
//+------------------------------------------------------------------+
 
Nikolay Demko:

Imagine what this code would look like on your kernel:

You don't quite get it right. The functions won't be ordered at all. They will be ordered by the indexes of their calls in the kernel, and will be in the logical chains that the engine will follow.

Example: We write all functions we need and pile them together. We only need to organize their calls. In the core. In logical chains. The entire organization of the program will be created not in classes that are inherited one from another, but in an array in the form of chains of indexes of calls of particular functions.

The functions themselves will be divided into three types: logical (checking conventions), procedural and computational...

 
Реter Konow:
It's strange... I have been programming exclusively in Russian for three years and never had anything like this... May it be an old build?

I once installed a friend's Maths software, he was working on it, everything was fine, but then I had to move it to a new computer and it got lost. Somehow it was difficult to hack and it was installed by copying some folders and files. But newer version with key generator appeared on the web... All set well, runs, understands the Cyrillic alphabet, but the work of the old version, did not understand the Cyrillic alphabet. As I did not try anything did not work.

And the second reason is that if the code is placed in CodeBase or a product in the marketplace, the code or product is duplicated at other sites and there Aglian is preferable.

 
Реter Konow:

You've got it all wrong. The alternative to OOP in the form of a kernel would only be in the organisation of the programme. Instead of separating functions and variables into classes, they will be spread out over their functions. The functions will not be ordered at all. What will be ordered will be the indexes of their calls in the kernel, and will be in the logical chains that the engine will follow.

Example: We write all functions we need and pile them together. We only need to organize their calls. In the core. In logical chains. The entire organization of the program will be created not in classes that are inherited one from another, but in an array in the form of chains of calls of particular functions.

The functions themselves will be divided into three types: Logical (event checking), procedural and computational...

Haven't you had a chance to see the decompiled code for these three years?

I'm afraid the index chains will be as hard to read as the decompiled variables.

 
Alexey Viktorov:

I once installed a friend's Maths software, he was working on it, everything was fine, but then I had to move it to a new computer and it got lost. Somehow it was difficult to hack and it was installed by copying some folders and files. But newer version with key generator appeared on the web... All set well, runs, understands the Cyrillic alphabet, but the work of the old version, did not understand the Cyrillic alphabet. As I did not try anything did not work.

And the second reason, if the code is placed in CodeBase or product in the market, the code or product is duplicated at other sites and there it is preferable aglitskiy.

Interesting case.

About the marketplace, isn't the code closed for the software there?

 
Реter Konow:

Interesting case.

About the marketplace, it's a closed software code, isn't it?

What about prints and alerts? And comments on input variables.