Do you really use C++?
-
And by that, I mean OO principles? Encapsulation, etc. I'm not worried at all about inheritance, and polymorphism is helpful at times. But abstraction and encapsulation seem so powerful to me. OO programming (language does not apply) lends itself to interfaces, discipline, self preservation. For those of you who sit down in front of VS2xxx or any other OO oriented compiler, do you ask yourself, "Can I put this in a class?" After writing thousands of lines of code, does a bell ever ring, "If you keep digging, the hole is only going to get deeper?" I live in the embedded world where our code has to adapt to the reality of real life. A machine has inertia and a large number of other physical properties. Sometimes the interactions BEG to be encapsulated in a class where the domain knowledge and behavior can be kept in one location.
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
The liberty that Franklin was referring to was the right of the legislature to impose war taxes. To Franklin, imposing war taxes was an "essential liberty". Read Against a Crude Balance: Platform Security and the Hostile Symbiosis Between Liberty and Security | Brookings Institution[^] to understand what Franklin actually meant. A clue. He was opposed to what people call "liberty" today.
-
And by that, I mean OO principles? Encapsulation, etc. I'm not worried at all about inheritance, and polymorphism is helpful at times. But abstraction and encapsulation seem so powerful to me. OO programming (language does not apply) lends itself to interfaces, discipline, self preservation. For those of you who sit down in front of VS2xxx or any other OO oriented compiler, do you ask yourself, "Can I put this in a class?" After writing thousands of lines of code, does a bell ever ring, "If you keep digging, the hole is only going to get deeper?" I live in the embedded world where our code has to adapt to the reality of real life. A machine has inertia and a large number of other physical properties. Sometimes the interactions BEG to be encapsulated in a class where the domain knowledge and behavior can be kept in one location.
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
C++ was used to teach Object Oriented programming in a University Class I took in Computer Science back in the late 80's. I found it was easy enough to pick up if well presented. I was able to get things to work and that is a big plus. Modern tools are even better than the ones I used then. It also offers Multiple Inheritance which is also a major concept of OO, but also quite a complication if combined with Polymorphism at the same time. If you want an easier language to learn, then I would suggest C# since you can get a good free IDE from Microsoft for that.
-
And by that, I mean OO principles? Encapsulation, etc. I'm not worried at all about inheritance, and polymorphism is helpful at times. But abstraction and encapsulation seem so powerful to me. OO programming (language does not apply) lends itself to interfaces, discipline, self preservation. For those of you who sit down in front of VS2xxx or any other OO oriented compiler, do you ask yourself, "Can I put this in a class?" After writing thousands of lines of code, does a bell ever ring, "If you keep digging, the hole is only going to get deeper?" I live in the embedded world where our code has to adapt to the reality of real life. A machine has inertia and a large number of other physical properties. Sometimes the interactions BEG to be encapsulated in a class where the domain knowledge and behavior can be kept in one location.
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759