A question for OOP experts. - page 23

 
Artyom Trishkin:
I'm certainly not him, but my articles 1 - 3 I think, maybe a little further than 3, have all the information on specific examples of tracking orders and positions.
Thanks. I'll try to figure it out.
 
Artyom Trishkin:
...

I read your article. It talks about objects and their properties. Question: what in the OOP concept is meant by "object"? I thought it was a reference to a class. May it be the class itself? Or a structure?

 

In general, as I understand it, the Object is a Class. It combines all the properties (fields) and methods of a particular concept. Inheritance - hierarchical distribution of Class-Objects, reflecting the semantic structure.

Structure is a set of properties, data, objects.

Class is not only an object, but also a category. Relationship of categories - inheritance. It is also a connection of objects.

In short - Class is a category, a group of data, an object, a structure. Classes consist of interrelations reflecting the semantic hierarchy of concepts of any domain.

 
Реter Konow:

George, I would like to understand the meaning and application of virtual functions in practice (in which tasks and how exactly you use them) and the meaning of abstract classes. If you have specific tasks that you solve with these tools, please describe them.

Artem said it right above. He has good articles with code examples.

I can also lay out my own codes and solutions, but they will be more complicated. For example, I have a virtual interface of timeseries container - in other words, access to symbol price data. And all the work of all the Expert Advisors is tied to this interface.

Now I'm considering options of scalpers on ticks. So, I took that same virtual interface and inherited a class representing a container of seconds bars from it. I am now debugging this class. When I write it, all EAs (both those 670 that are in the League, and any others) will immediately be able to work with any second timeframes, including non-standard ones like "13S".

That is, the fact that I have all data encapsulated in the object, and "expose" only the virtual interface - allows me to use features in my already written EAs that were not originally foreseen at all.

 
Реter Konow:

I am reading your article. It talks about objects and their properties. Question: what in the OOP concept is meant by "object"? I thought it was a reference to a class. May it be the class itself? Or a structure?

Let's think of it this way:

Suppose one has to build a house. For this purpose it has to be designed. This is the class (description, i.e. does not physically exist). And when you see a house already built, it's an object. :)

 
Реter Konow:
Do you think you can make a breakthrough in AI by relying on publicly available libraries? I mean, take pieces of code from one place, bolt in pieces of code from another and you're done. Really?

Seriously. It's precisely this 'taking bits and pieces of code' that allows us to avoid thinking about a lot of important points, and focus on addressing those areas that will be new.

It's just that you are mindful of all these points. And you can write code with them in mind. But such mega-memory is a rare thing. Most people quickly forget all those little things if they are not handled for some time.

 
Petros Shatakhtsyan:

Let's put it this way:

Let's say you have to build a house. To do this, you have to design it. This is the class (description, i.e. does not physically exist). And when you see a house already built, it's an object. :)

In this version of sense, the Class is a warehouse of tools, materials, raw materials and machines. Hierarchy of inherited classes - like the workshops of a 'factory'.
 
Georgiy Merts:

Seriously. It's just that 'taking bits and pieces of code' that allows us to avoid thinking about a lot of important things, and focus on solving those areas that will be new.

...

George, in every library, in every solution, there is a concept. If I take someone else's concept and try to develop mine on its basis, I might get a concept crash, because a system built on two or more concepts cannot be stable. Therefore, innovative things have to be developed by yourself and from scratch. So as not to struggle with the "generic" errors and inconsistencies of the other authors.

 
Реter Konow:
Do you think you can make a breakthrough in AI by relying on publicly available libraries? That is, you take pieces of code from one place, bolt in pieces of code from another and you're done. Really?
Are we talking about the same thing now? I mean neural networks personally. Something fundamentally new is hard to come up with there. And for assembling and training various NSs, libraries have been created long ago in commodity quantities for all major languages.
 
Реter Konow:
In this variant of sense, Class is a storehouse of tools, materials, raw materials and machines. Hierarchy of inherited classes - like "factory" workshops.

Not so much.

Here's another way of explaining it. Usually nobody explains it that way.

All programmers know what int x, for example, is;

Now let's imagine that the word int is like the name of a class. And what does it describe ?

1. an integer

2. takes up 4 bytes in memory

3. takes values +- within some limits. (that much is enough);

And when we write int x; then we declare an object x, int type. x already physically occupies a 4 byte field in RAM.