The EOP for schoolchildren. - page 4

 
Dmitry Fedoseev:

Nah, they (the schoolboy) wouldn't understand. Especially not some kind of matrix. They will say: why do we need this polymorphism... some kind of polymorphism?

poly what...

 
Ihor Herasko:

What's the nonsense? Open the definition of getters and read:

But the mechanism by which private data can be retrieved may be different. In C# it is one way, in C++ and MQL it is another. But this does not deprive methods of the "getter" definition.

Here we read "special" method.

 
Dmitry Fedoseev:

This is just inconvenient - you need to know which element has x and which element has y. When using structure, everything is clear, and it eliminates error and reduces the amount of code.

In this case (let's say), the structure is used as a syntactic technique, and when accessing its data, you need to multiply instances, as opposed to an array, which balances the inconvenience.

The meaning of using the structure is deeper, but TC presents it only as such. It turns out - OOP is a set of syntactic techniques. This is what "schoolchildren" will learn. Then they will understand that it is possible to simplify syntax in their tasks and start denying OOP.

We need conceptual proof of necessity of OOP, not syntactic proof.

 
Thanks for the branch. I like it.
 
Dmitry Fedoseev:

Here we read the "special" method.

Scroll down a bit further and read the article. There is no MQL, but there is C++. Or there are no getters in C++ too?

 
Реter Konow:

In this case (let's say), the structure is used as a syntactic technique, and when accessing its data, you have to multiply instances, as opposed to an array, which balances the inconvenience.

The meaning of using the structure is deeper, but TC presents it only as such. It turns out - OOP is a set of syntactic techniques. This is what "schoolchildren" will learn. Then they will understand that they can simplify syntax in their tasks and start denying OOP.

You need a conceptual proof that OOP is necessary but not a syntactical one.

You don't need to fecundate anything. It works just like a normal array, only more convenient.

Conceptual proof... then it's also needed in the field of brick making... to smear walls straight out of clay is more convenient, and try to prove that it isn't.

 
Ihor Herasko:

Scroll a little further through the article. There's no MQL, but there's C++. Or there are no getters in C++ as well?

I haven't even opened this article. What am I supposed to see there? What does C++ have to do with it?

 
Dmitry Fedoseev:

There's no need to multiply anything. Works just like a normal array, only everything is more convenient.

Conceptual proof... then it's also required in the field of brick making... Smearing walls straight out of clay is more convenient, and try to prove that it isn't.

The need for OOP in data manipulation. I REPEAT - WITH DATA.

OOP helps you to distribute data and organize access to it. YOU NEED CLASSES AND STRUCTURES FOR THIS.


In a coordinate task, there is too little data and therefore structures and classes are not needed. If you scale the task and bring manytypes of data into its "field", classification will be required. Then classes and structures will follow.

Without the need for classification, there is no need for classes. Without the need for structuring, there is no need for structures.

Without the variety of data united by different objects - there is no need in OOP.

Putting OOP into flat programs with monotonous data is harmful even in training, because the concept is wrong. People start to think that OOP is a set of syntactical tricks and they use it as they please. Where necessary and not necessary.

 
Реter Konow:

1. The need for an OOP in data handling. AGAIN, WITH DATA.

OOP helps you distribute and access data easily. THIS REQUIRES CLASSES AND STRUCTURES.


2. In a coordinate task, there is too little data and therefore structures and classes are not required. If one scales the task and adds many data types to its "field", classification will be required. This will be followed by classes and structures.

Without the need for classification, there is no need for classes. Without the need for structuring, there is no need for structures. 3.

3. without the variety of data, united by different objects, there is no need in OOP.

Putting OOP into flat programs with monotonous data is harmful even in training, because the concept is wrongly exposed. People start to think that OOP is a set of syntactics and they use it as they please. Where they should and shouldn't.

1. Empty talk. All programming, without exception, is about working with data.

2. There is not much data in the coordinate task itself, but if there is a lot of work, it will be easier. Don't look for something epic in OOP. It is a way of grouping data and methods of working with them, as well as a way of reusing code.

3. any manifold, if independent populations can be distinguished in it, can be divided into classes and will be fine.
 
Реter Konow:

OK, let's move on to the code.

What was the objective? - To conveniently store point coordinates. For what? - For the quick access.

The POINT structure and its instances are unnecessary entities in the solution if the task is only to quickly access the data. Look how much easier it is to have access via a matrix:

You say you are not a philosopher, but "structure" is a philosophical concept and its presence in the solution must be justified.

It might be easier for you to call: "Hand #1" and "Hand #2", but most would prefer to call them "left" and "right".

Reason: