That's the style! :) - page 4

 
ALEX_SPB_RU >> :

Definitely agree that you should do a customisable style...

But I strongly disagree that MQL5 style is abnormal. By the way, I saw the same or almost the same style (it's hard to remember exactly, because it was many years ago) in books that I coded with - "How to program in C and C-plus-plus". By the way, the author was an American from some university, one of the first testers of this very C language.

This is a stick with two ends, if you give free rein to programmers styles will finally diverge and get the Tower of Babel,

>> >> still, there must be some deterrent and guiding factor (to get used to).


but not everyone can read it,

but everyone can read it in block letters, no matter who writes it.

 
A customisable styler is exactly what you need to translate someone else's awkwardly formatted text into beautiful and comprehensible text. Not to impose your own style on others.
 

Urain писал(а) >>

there has to be some kind of constraint and guiding factor (to get used to).

If this same factor will be a curse on the compiler - then I'm afraid there will be one of two things - either I will have to write some convertor from "human" to "correct" style (what an idiocy! Although - the existing IDE actually does this), or not to program in MT5. I'm not even considering the option of using the style from MT5...
 

All waving their fingers menacingly, and imagine that you read all this on the forum not in block letters but in the handwriting of the original (written by hand) this nightmare can not even imagine no one will understand anything, or all come to a consensus that it is necessary to introduce a script similar to block letters.


ps think for a moment that style is just a habit and nothing more, a way of thinking.

 
Urain >> :

How menacingly everyone wags their fingers, and just imagine that you read all this on the forum not in block letters, but in the handwriting of the original (written by hand) this nightmare can not even imagine no one would understand anything, or all come to a consensus that we should introduce a script similar to the printed font.


ps ps think for a second that style is just a habit and nothing more, a way of thinking.

It is unpleasant when thinking patterns are imposed and they do not give a right to choose.

 
TheXpert >> :

Here you are wrong and even contradicting yourself:

I'm not contradicting myself, but in the process of discussion, I came to the idea that the generally accepted formation of templates for the future and the future is based on them as a given. In a free formation of patterns is more efficient because all possible styles are tried, but there is no guarantee that the most convenient (most likely the most printable wins) those one Integer or along with Scriptor will set the style in the future and such people as gpwr who write a little but to the point will remain on the sidelines of style.

 

The thing is that MQL4-5 is mostly written by programmers who used to work or are working in some company, where there is an accepted style of coding, so they got used to it and it is much easier for them to read the code. Switching to a new style takes time and not everyone can accept it, even if it seems logical.

You just need to make the styler customizable like in Java IDE (for example intelliJ) or MSVS. And also possibility to format code block, for example if you take it from external source and insert it into your own code.

I would also be very pleased with Foldin in MQL5, when within one file with the sources you can collapse or expand blocks of code of functions, operators, etc.

In this case, you can write large programs in one file (instead of multiplying a bunch of files with headers) and simply collapse the code when it is not used. I personally like folding or outlining, which is implemented in all modern versions of IDE.

 
Urain >> :

I'm not contradicting myself in any way.

Since I've seen it, I'll continue, honestly, I didn't mean to.

Not at all. The style should not affect the comprehensibility of the code, but it does, and you yourself confirm that by saying that you understand one style more than the other.

So -- the pattern of thinking has no such effect on the perception of information.

 
TheXpert >> :

>> so -- a thought pattern has no such effect on the perception of information.

That's where you're wrong, the thinking pattern has the strongest influence on the perception of information,

So much so that many people don't see things that shouldn't be there.

 
YuraZ >> :

I'm used to this style.

everyone's style is different

>> it's good if the styler developers do a couple of styles.



if ( ...
{
   for (
   { 


   } 
}

I think this is a classic style. I don't remember exactly, but Van Tassel's book was quite clear about the style.

Reason: