Discussion of article "Understanding MQL5 Object-Oriented Programming (OOP)"

 

New article Understanding MQL5 Object-Oriented Programming (OOP) has been published:

As developers, we need to learn how to create and develop software that can be reusable and flexible without duplicated code especially if we have different objects with different behaviors. This can be smoothly done by using object-oriented programming techniques and principles. In this article, we will present the basics of MQL5 Object-Oriented programming to understand how we can use principles and practices of this critical topic in our software.

Encapsulation is the method that enables to link of functions and data in one class, the data and functions in the class can be private which will be accessible only within the class or it can be public which will be accessible outside the class. The Encapsulation concept helps to hide the complexity of the class implementation and gives the developer full control of his data, helping to keep track of all values which rely on others without conflict.

So, we can say that Encapsulation helps to keep our system up and running and avoid a lot of possible errors in addition to giving a high level of control for the developer and helping in testing and processing classes data smoother and easier without affecting or changing the whole code of the software. According to what mentioned it helps also to solve errors and prevent to be coding complicated.

The following picture represents the Encapsulation concept:

Encapsulation

Author: Mohamed Abdelmaaboud

 

Wow, how time flies )). About 10 years ago I tried to open a branch on OOP in Russian and English parts of this forum. In the Russian part I got hysterics that everything is complicated and we, proletarians, don't need it! Grandfathers ploughed with ploughshare and we will not break traditions! In Anglo they simply killed the branch without explanation.

And now we are taught by Mohamed )). The article is a reprint from some boring academic textbook, I fell asleep at the first paragraph.

 
Alexey Volchanskiy #:

Wow, how time flies )). About 10 years ago I tried to open a branch on OOP in Russian and English parts of this forum. In the Russian part I got hysterics that everything is complicated and we, proletarians, don't need it! Grandfathers ploughed with ploughshare and we will not break traditions! In the English part they simply killed the branch without explanation.

And now we are taught by Mohamed )). The article is a reprint from some boring academic textbook, I fell asleep at the first paragraph.

It wasprobably too early. Few people used OOP in their work back then. And those who knew and used it didn't want to waste their time discussing it.

Unlike you Alexey, I didn't fall asleep, I read to the end, but from the middle of the article I started skipping a few lines... In general, I didn't like the article. I don't see anything that is not in the documentation.

 

Let's start with the definition of OOP. OOP helps you create and develop reusable software without duplicating work and code by applying the DRY (don't repeat yourself) concept.

There's something to that, but where is the definition of OOP?

Encapsulation is an encapsulation that allows... It's hard to come by, the concept of visibility for OOPers is apparently private)))) And that access modifier is encapsulation, readers should guess about it themselves)))).

It's a normal business, to make an extract from a textbook for 200 tugriks, I hope you wrote it yourself, without GPT)))).

 

From the following:

"Inside the OnInit function, define the following for the three timeframes:

  • String timeframe "

the quality of the article is imposed on the quality of the translation

 
Mahmoud was trying, and you just jumped on it :-)
 
Fedor Arkhipov #:
Mahmud was trying, and you just jumped on him :-))
That's the easiest way to get attacked ))
Mahmud probably knows the saying "a dog barks and the caravan goes on its way".