I am not sure if i will be understood (If my question will be understood) but hope so
I am not using oop, and I think i do not understand its ideology, but there is some question i could ask and maybe answers would help me to better understand it
I understand in oop you can build some graph/net of objects where objects can seen each other through the references to other objects they hold as its own fields,
for example
class Game {
private:
Graphics& g;
Window& w;
public:
///
}
class Window {
private:
InputSystem& i;
Audio& audio;
public:
///
}
HardwareSubsystem& h;
public:
////
}
etc, this is fictiuos example but it shows that in OOp you can build some net
of objects seeing each other through the references
My question is : is this kind of graph environment main purpose or such oop program; On the other words Is the main aim of oop coder to build such net
of objects which will be interfering each another throught this references
I dont know if this pure way of interacting between objects is the aim of this
I am asking becouse of that in oop languages like c++ for example you could
probably reach to other objects in some other way than through such kind of
references (would it be violation of oop rules for oop programmers?)
Other part of the question is that before you have the objects (like Game, Audio, Window here) and before you have setted the references between them you must
set up then manually (you must instantiate the objects somewhere in the code
tree and you must run also the code which will setup/bind the references - this is some kind of 'inner' and 'outer' sides of oop if you understand what i mean :
in inner side of the oop you got internal code of objects and references to other as its fields - in outer side of oop you must setup the objects and setup the references before the system of objects could work
is the main purpose of oop to work in this inner side (when you are not interested where objects was instantiated if it is global space, main function or field of another objects of local scope of some function - but only interested in the inners of objects and explicit references ) and the outer side is only used to setup the
thing -
or the outer side (and scope visibility and such things) is also a field where some oop techniques could be developed and used (or they should be avoided and only focused to develop the proper objecst graph)
I hope i will be understod, I am curious how indyvidual oop programmers see this thing (though i am not sure if i will be understood what i mean by inner and outer
side of oop)