The EOP for schoolchildren. - page 6

 
Ihor Herasko:

OK. Give your definition of a getter.


is not a horse

 
Dmitry Fedoseev:


is not a horse.

I thought I was dealing with someone who could explain what he knows. But here, even at the level of definitions, there is trouble.

 
Ihor Herasko:

I thought I was dealing with someone who can explain what he knows. I thought I was dealing with someone who could explain what he knows.

Yes, fantasize as you like, I have long understood everything with some of you here too, ready to freeze your ears off to spite your grandmother.

 
Dmitry Fedoseev:

You can fantasize all you want, I've understood everything with some of you here for a long time too.

Everything is clear to you. You just can't explain))

 
Ihor Herasko:

Everything is clear to you. You just can't explain.)

Keep freezing your ears off to spite your grandmother.

 
Alexey Viktorov:

I've been reading it since the first minute of its creation.

reading is not enough, imho, you need to try to set tasks and write in procedural style, then (it is not difficult) rewrite this task in OOP style

As TC has repeatedly written, OOP allows you to quickly scale up the task, speeds up development and reduces the number of errors in writing the program

For MQL: One of my least favorite problems is the partial closing of a series of orders; in a procedural programming style, after calling a subprogram that would close one order, error handling needs to be organized - what to do if I failed to close all orders partially in one call? - the server did not allow to close partially? - I asked this question at the beginning of the year, well, as usual, in 99% of cases all common solutions were reduced to the analysis of order comments - like read there, the server will write everything there.....imho, not professional

In OOP style this problem is solved "in 2 clicks", we call the method partially closing the order, and the data about the order status - ticket, necessity of its modification..... and methods working with the order are stored in the ORDER class - solution with maximum flexibility and scalability for next tasks, imho


the same applies to tasks with graphics in MQL - if you have one text label, it's not a problem to work with it, but if you have 10-100 labels? - What if you need to change the colour scheme, selectively for some labels "coral" colour, and for others "pearl with buttons"? .... and after a week it took to add 3 more buttons.... and a week later another 10 buttons needed to be removed....


ZS: another windmill fight topic .... no, remembered someone (forgot their last name ))) ) - who said the earth is round and then he got burned? )))) - this is what the fight against illiteracy and/or broadening of the mind looks like

 
Igor Makanu:

reading is not enough, imho, you need to try to set tasks and write in procedural style, then (it is not difficult) rewrite this task in OOP style

As TC has repeatedly written, OOP allows you to quickly scale up the task, speeds up development and reduces the number of errors in writing the program

For MQL: One of my least favorite problems is the partial closing of a series of orders; in a procedural programming style, after calling a subroutine that will close one order, error handling needs to be organized - what to do if I failed to close all orders partially in one call? - the server did not allow to close partially? - I asked this question at the beginning of the year, well, as usual, in 99% of cases all common solutions were reduced to the analysis of order comments - like read there, the server will write everything there.....imho, not professional

In OOP style this problem is solved "in 2 clicks", we call the method partially closing the order, and the data about the order state - ticket, necessity of its modification..... and methods working with the order are stored in the ORDER class - solution with maximum flexibility and scalability for next tasks, imho


the same applies to tasks with graphics in MQL - if you have one text label, it's not a problem to work with it, but if you have 10-100 labels? - What if you need to change the colour scheme, selectively for some labels "coral" colour, and for others "pearl with buttons"? .... and after a week it took to add 3 more buttons.... and a week later another 10 buttons needed to be removed....


ZS: another windmill fight topic .... no, remembered someone (forgot their last name ))) ) - who said the earth is round and then he got burned? )))) - this is what fighting illiteracy and/or broadening one's horizons looks like

In my opinion, in mql the set of problems to be solved via OOP is very narrow. The language itself, it seems to me, is nothing but OOP in C++ or whatever. And this OOP is offered in the form of a standard library. And to this OOP it is suggested to add, otherwise I wouldn't say, another OOP. And then another step... Rightly said Warlock, though angry, but benevolent, for my tasks OOP is like a dog turntable. And what good is setting a problem and then implementing it through OOP if that problem can be solved in procedural style without any problems.

For example, take .mqh from fxsaber`a to write codes for MT5 as well as for MT4. Maybe someone needs it, but look who... To someone who does not want or absolutely cannot master mql5. Or take iCanvas from Nikolay ... I forget his last name. It seems to be a useful library, but it is not easy to understand it, and there is no documentation, even a smallest description. It's not a complaint, sorry Nikolay, it's a fact. So, when I decided to try writing a graphical label, it was easier to write it without reference to either standard library or Nikolai's library.

 
Alexey Viktorov:

In my opinion, mql has a very narrow set of tasks that need to be solved through OOP. The language itself seems to me to be nothing more than an OOP in C++ or something. And this OOP is offered in the form of a standard library. And to this OOP it is suggested to add, otherwise I wouldn't say, another OOP. And then another step... Rightly said Warlock, though angry, but benevolent, for my tasks OOP is like a dog turntable. And what good is setting a problem and then implementing it through OOP if that problem can be solved in procedural style without any problems.

Unfortunately you're 90% right, but only because the trading strategies that traders ask to write .... Frankly speaking, they are primitive. There was some excitement when it became possible to create quality graphics panels in MQL, but it turned out that the end users didn't need it either - this is the industry's problem, the public, though motley, is interested in it .... they only want one button: money ...

Alexey Viktorov:

For example, take .mqh from fxsaber`a for writing codes for MT5 as well as for MT4. Maybe somebody needs it, but look who ... The one who does not want to or absolutely cannot master mql5.

I'm using this library, because I need mt5, but I don't want to spend my time studying order system, but I tried to ask it once or twice in MT5 newbies thread... I don't really want to spend my time studying order system, but I tried it a couple of times in MT5 newbies branch... No results - in fact, there's no one there who knows how order system works and answers my questions... Well, it's a "Jumblebug" to put it mildly.

Alexey Viktorov:

Or take iCanvas from Nikolay ... I forget his last name, you understand. Seems to be a useful library, but it is not easy to understand it, and there is no documentation, even a smallest description. It's not a complaint, sorry Nikolay, it's a fact. So, when I decided to try writing a graphical label, it was easier to write it without reference to either standard library or Nikolai's library.

used@Nikolai Semko's library a couple of times - nothing ordinary, just plug it in and use it... the principle is like 99% of daily released EAs in KB - the moderator doesn't bother with the order system there, right? - the AdS is written in the form of OOP and he produces whatever Expert Advisors he thinks up

 
Alexey Viktorov:

In my opinion, mql has a very narrow set of tasks that need to be solved through OOP. The language itself seems to me to be nothing more than an OOP in C++ or something. And this OOP is offered in the form of a standard library. And to this OOP it is suggested to add, otherwise I wouldn't say, another OOP. And then another step... Rightly said Warlock, though angry, but benevolent, for my tasks OOP is like a dog turntable. And what good is setting a problem and then implementing it through OOP if the problem can be solved in procedural style without any problems.

For example, take .mqh from fxsaber to write the codes for MT5 as for MT4. Maybe somebody needs it, but look who. To someone who does not want or absolutely cannot master mql5. Or take iCanvas from Nikolay ... I forget his last name. It seems to be a useful library, but it is not easy to understand it, and there is no documentation, even a smallest description. It's not a complaint, sorry Nikolay, it's a fact. So, when I decided to try writing a graphical label, it was easier to write it without reference to either standard library or Nikolai's library.

Application of OOP implies a level of complexity of tasks, much higher than in algotrading. That is why there are disputes. OOP is needed by professional programmers and developers to deal with complex programs. There is little room for such a serious approach. It is wrong to explain the meaning of OOP on small examples. The sense of OOP is in large-scale work with huge amount of data and functions. Diversity of data requires separation and classification, and then there is the relevance of encapsulation of description, inheritance of properties and methods between hierarchically separated classes.

This doesn't make sense on small tasks.

 
When programmers learn OOP, they are immediately introduced to the world of large programs and begin to navigate there. However, their own function in this "world" may be small. It does not matter. They just join the common sea of programs and libraries and what they do there. Do algotraders need it? It's hard to say. Those who need it will master it. The rest will think long and try something and call it OOP...
Reason: