Virtual Inheritance
Remember the Object Oriented Programming where you have a Super Class and a Sub Class? Let's say the sub class is inherited from the super class. What happens now? The Sub Class has all the functions and variables inherited from the super class, except of course the private variables. Also, don't these classes have constructors and destructors? Isn't this an analogy to something that we see everyday - our lives? My parents inherited the so called "functions and variables" from my grandparents and I from my parents. Apart from the inheritance of tangible entities, we inherit "most" of our identity from our parents. Bringing back the analogy of virtual inheritance in computer terms, the Sub Class can also have functions and variables of its own. Similarly, we can differentiate ourselves from our parents or from any "Super Class" by one of the main functions known as our "Values". The Values that we form are partially inherited from our parents, but, mostly by ourselves - based on our experiences - either by observing or self exposure to elements that make us what we are. With this basic premise, we can easily conclude that no child is like the parents, or can be like the parent, even though the child acquires many things from her parents. Now since the child is not like the parent, why does a parent really try so hard to teach the child to be like him/her? Most of the parents don't remember what they did as a child, think that they are "grown ups" and teach a child values and ethics based on their experience that the child might not even get the head or tail of it and follow her own heart and mind. Why is it so difficult to be the Super Class and let the child choose all the functions from you and let her choose her own Values for herself? It's like saying Pranayama is good for your lungs and sneezing all the time. When you cannot do it yourself, don't preach!! Give options. Your experience definitely gives you the power to give your child the options and that is what the child would really take as a learning and inherit from you. Those are the real functions that are inherited from the Super Class.
Now imagine a scenario of multiple inheritance. There are 2 Super Classes and 1 Sub Class. Super Class A has a function of Anger and Super Class B has a function of Love. Now the Sub Class, by default has to take in both these functions. Imagine the chaos and confusion in the mind of the child when she receives constant anger from one parent and constant love from the other. Where is the balance? Where would she get the help from now? Instead of lamenting later on, the 2 super classes can be friend classes and inherit functions from each other and form a common Super class so that no concept of multiple inheritance can take place. A constant and persistent effort and a learning mind can do help with this and do wonders. Computer geniuses haven't yet devised a machine that can think better than the human mind. We have the power to create, and to destroy and this makes us better than any computer. Take small ideas and extrapolate them and expand the horizon of your lives.
1 comment:
Reminds me of a Calvin and Hobbes quote: I am annoyed. My parents don't get me and I don't get my parents. I am related to two people I don't relate to.
Rings a bell? hehe...This parent and child issue is something that has been bothering me for years. You have summarized your conflicts about this very well. Yeah the conflict remains a conflict though...
Post a Comment