I got the idea of class
It can not eliminate the dependency of component of logic.
but It just provide the interface to isolate component.
Quote:Original post by derek7
It can not eliminate the dependency of component of logic.
but It just provide the interface to isolate component.
That's exactly what classes are for! Finally someone understands, i've been trying to explain that classes don not eliminate the component of logic but nobody took me seriously. They said those drugs were bad, now I'll show them!
Quote:Original post by derek7
It can not eliminate the dependency of component of logic.
but It just provide the interface to isolate component.
I know English isn't your first language, so I'll go with you on this one.
There are a number of ways you might use classes some of which are:
1) If you use pointers to objects, a class can reduce a dependency to merely a name if that is all that is needed.
2) If you use inheritance you can make the dependency just on the name of the base class.
3) You can also depend upon the functions visible in the base class if you make the whole declaration of the base class visible.
4) Or you can depend upon the derived classes if you choose.
5) If you hold real objects rather than pointers then you will depend upon the whole class declaration.
6) If you put the implementation of the class in the header then you will depend upon the logic of the component and the components that it uses.
If you design to make use of any of 1 - 5 then you won't need to depend upon the implementation or the logic.
Does that make sense?
Quote:Original post by Kristafarii
Surely this is a perfect example of abstraction and data hiding.
lol
Lisp programmers know that the Common Lisp Object System is crap.
C++ programmers know that Java is crap.
Why is everyone so obsessed with OO this and that, yet we still don't have direct access to a relational data model in code? (SQL hardly counts when you have to write so much fluff to get the data from the database.)
http://www.geocities.com/tablizer/oopbad.htm <- says it better than I
C++ programmers know that Java is crap.
Why is everyone so obsessed with OO this and that, yet we still don't have direct access to a relational data model in code? (SQL hardly counts when you have to write so much fluff to get the data from the database.)
http://www.geocities.com/tablizer/oopbad.htm <- says it better than I
Because not all of life is relational?
Most programs I've seen benefit from procedural for the basic algorithms, OOP for the large-scale architecture, and generic programming to use as glue code. Single paradigm languages annoy me greatly.
Most programs I've seen benefit from procedural for the basic algorithms, OOP for the large-scale architecture, and generic programming to use as glue code. Single paradigm languages annoy me greatly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement