OOP vs procedural programming - page 29

 
Dmitiry Ananiev:

Look at the orders on the freelance market. Hardly any order can't be fulfilled in a day. More time is spent on agreeing on TOR, answering the customer's questions, turning them upside down and accepting/delivering the job. Of course, it is nice to be able to write the same Tetris in MQL5. But this language is designed for something else.
The Expert Advisor Wizard based on ready-made strategies is an example of using OOP. I tried to do it once and I understood it. But now I don't remember how it all works.
The procedural style describes everything clearly. Guess when I will switch completely to OOP ?

Another example: you have a picture you want to write on. Will you use simple Paint or will you load Photoshop with hundreds of plugins? Yes, as long as you download Photoshop, I'll do everything in Paint with the 5th time and forget about this task.



Personally I'll use only MT5 if only for its speed. For development I use MT4 because it's easier to see when and where a program slows down. OOP or not, MT5 is still much cooler.
 
Реter Konow:
Well personally I will only work on MT5 at least because of its speed. For development I use MT4, because it's easier to see when and what the program lags on. OOP or not, MT5 is still much cooler.
Sounds like: I have a Cruzak and my wife has a Smart. The Cruzak is a thing. That's why I drive the Smart to get groceries during the day and a beer in the evening. Because it's easier to park, doesn't eat much gas, doesn't need much repair.
 
Реter Konow:

You're kidding, but in my imagination, I have such an outlook on this approach that I can't get over it. It seems that, over time, I might be able to start a self-improvement mechanism for the system. If I make a logical kernel and make it randomly generate different mechanisms. Then just select and select the right ones. Then grind them out a little bit... thanks to the kernel, incredible things can be done.


Sorry, Peter :) but it's easier, or rather more comfortable, to do it with classes.

 
Dmitiry Ananiev:
Sounds like: I have a Cruzak and my wife has a Smart. The Cruzak is a thing. That's why I drive the Smart to get groceries during the day and a beer at night. Because it's easier to park, doesn't eat much gas, doesn't need much repairing.

Witty. But for me, the real advantage right now is the slowness of MT4. Until I finish developing it. I can just see more clearly when it's slow... No kidding.

Then I won't need it for fuck's sake.)

 
Dmitiry Ananiev:

Look at freelance orders. Rarely can an order be realised in a day. More time is spent on agreeing the terms of reference, answering the customer's questions, poking his nose in and accepting/delivering the work.

...
The procedural style makes everything clear. Guess when I'll switch completely to OOP ?

Another example: you have a picture, it needs to be captioned. Will you use simple Paint or Photoshop with a hundred plugins? By the time you download Photoshop, I'll have done everything in Paint for the 5th time and forget about this task.

If you weren't writing disposable code - then using OOP would really be justified. For example I use OOP because it's too expensive for me to catch bugs in already released products.
 
Nikolai Semko:

Sorry, Peter :) but it's easier, or rather more comfortable, to do it with classes.

Told you, "to each his own"). I'm creative, so I come up with such ideas). What's wrong with that?

 

How can we explain why many brokers call MQL4 platform popular, but do not apply this epithet to MQL5?

Obviously, the difference is in the OOP, which is much harder to master and, as a consequence, in debugging and support of the written code.

For professional programmers this requirement is not critical, on the contrary, they actually benefit from "the more complicated, the better" for many reasons, since programmers are usually paid by the hour, and with a complex code you can simply earn more by the hour. It also makes it harder for other programmers to decipher and understand the code, which increases the employer's dependence on that programmer, etc.

It is also obvious that for trading purposes, where pay or own time is usually by project rather than by the hour, this rule does not work.

 
Vasiliy Sokolov:
If you weren't writing one-off code then OOP would really be justified. For example, I use OOP because it is too expensive for me to catch bugs in already released products.

I absolutely agree. This is the main advantage of OOP.

 
Andrei:

..

Obviously, all the difference is in OOP, which is much more difficult to master and, as a consequence, in debugging and support of the written code.

For professional programmers this requirement is not critical, on the contrary it is more profitable for them to have "the more complex the better" for many reasons, since usually programmers are paid by the hour and you can earn more by the hour on complex code. Also, it makes it difficult for other programmers to decipher and understand the code, which increases the employer's dependence on this programmer, etc.

...

You're really wrong. The employer is not the idiot you are trying to paint him as. No one will pay more, especially for a tangled code. Everyone wants to save money - to implement a project quickly, to spend minimum man-hours and at the same time to get a working system that doesn't require rewriting and modifications. That's why they demand to know this very OOP.
 
Andrei:

How can we explain why many brokers call MQL4 platform popular, but do not apply this epithet to MQL5?

Obviously, the difference is in the OOP, which is much more difficult to master and, as a consequence, in debugging and maintaining the written code.


But in MQL5 you can also program in a procedural style. This is not C#. What about the fact that it is less popular - time is passing and the world is changing... But the platform has a lot of advantages, that MT4 doesn't have. Don't these advantages mean nothing?