Jump to content
  • Advertisement
Sign in to follow this  
derek7

I got the idea of class

This topic is 4908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It can not eliminate the dependency of component of logic. but It just provide the interface to isolate component.

Share this post


Link to post
Share on other sites
Advertisement
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!

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Quote:
Original post by Kristafarii
Surely this is a perfect example of abstraction and data hiding.


lol

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!