OOP question
Well this isn''t really a specific oop question but a general one, I just want to know the advantages of using OOP over, well, not using oop. Also is it worth learning for game development? The only thing i think i know about oop is it''s a more structured way to code, but other than that i don''t know. please help.
Some people don''t think so, some people do (like me).
I really don''t know how to begin to describe the advantages...
There''s no OOD until there''s a virtual function.
I really don''t know how to begin to describe the advantages...
There''s no OOD until there''s a virtual function.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Learning good OOP/OOD habits is hard. And non-OOP is most of the time a little better performance. But the biggest and best advantage in OOP is maintaining code. Coding with OOP is faster than non-OOP. Because you're favourite OO language has a set of rules that makes changing different things about your design easier or makes debugging easier. After you learned the habits.
I think that OOP is a more structured way to code. It is possible to do good OO things in regular C. But it is easier to do OO in C++ of the rules imposed by it. But it is also possible to code non OO in C++.
Edited by - JanneVee on July 13, 2001 2:42:31 AM
I think that OOP is a more structured way to code. It is possible to do good OO things in regular C. But it is easier to do OO in C++ of the rules imposed by it. But it is also possible to code non OO in C++.
Edited by - JanneVee on July 13, 2001 2:42:31 AM
/JanneVee"Some People even believe that COBOL is a real programming language." Scott Meyers - Effective C++
Let's try this from the top.
Forget everything you've learned about OO. Forget the details, forget the definitions (like virtual functions). Forgotten? Good. Read closely.
OOP is a tool. It's a method. As such, there are as many opportunities to misuse it as there are to use it correctly.
What are the benefits of OOP? Some people claim OOP is beneficial when you're writing domain-isomorphic software. However, that's OOP in a different world. Where you are, OOP has only one clear benefit: it makes organizing and maintaining or reusing code much easier.
that's right. OO is only a pseudoterm for "compiler-supported special syntax". Basically, when you use OO, you take advantage of the compiler's built in additional syntax features. How you use them is up to you. I recommend you design with productivity and maintenance in mind, and always keep reusability in the forefront.
Most systems are hard to build without some kind of architecture to back you up. OO is an architecture. Game engines are systems.
Draw your own conclusions from there.
Edited by - GayleSaver on July 13, 2001 3:47:56 AM
Forget everything you've learned about OO. Forget the details, forget the definitions (like virtual functions). Forgotten? Good. Read closely.
OOP is a tool. It's a method. As such, there are as many opportunities to misuse it as there are to use it correctly.
What are the benefits of OOP? Some people claim OOP is beneficial when you're writing domain-isomorphic software. However, that's OOP in a different world. Where you are, OOP has only one clear benefit: it makes organizing and maintaining or reusing code much easier.
that's right. OO is only a pseudoterm for "compiler-supported special syntax". Basically, when you use OO, you take advantage of the compiler's built in additional syntax features. How you use them is up to you. I recommend you design with productivity and maintenance in mind, and always keep reusability in the forefront.
Most systems are hard to build without some kind of architecture to back you up. OO is an architecture. Game engines are systems.
Draw your own conclusions from there.
Edited by - GayleSaver on July 13, 2001 3:47:56 AM
VK
In the editor I''m working on I use templates, inheritance, classes, maybe one or two global functions, few global objects and variables that need to persist through the lifetime of the app and zero abstract or polymorphic behavior. I just haven''t had the use for those concepts yet. I don''t have a class hierarchy like MFC or Java do where all ojects inherit from one parent object. I instead have a Frame object that hosts toolbar, statusbar, paint, grid windows and few other objects. Subclassing I think it''s called. Have fun

quote:
Original post by GayleSaver
OOP is a tool. It''s a method. As such, there are as many opportunities to misuse it as there are to use it correctly.
Well said. This obsoletes my previous post.
/JanneVee
"Some People even believe that COBOL is a real programming language." Scott Meyers - Effective C++
/JanneVee"Some People even believe that COBOL is a real programming language." Scott Meyers - Effective C++
well OOP is really good ..
just dont over do it .. and make it bloated like MFC..
i use OOP really alot, templates are really good at abstracting data types.
use OOP and STL as much as possible..
{ Stating the obvious never helped any situation !! }
just dont over do it .. and make it bloated like MFC..
i use OOP really alot, templates are really good at abstracting data types.
use OOP and STL as much as possible..
{ Stating the obvious never helped any situation !! }
Thanks for the replies everyone, I think i''m going to attempt to learn OOP practices some since it makes managing code easier, that''s one thing i need.
I think architectures are broader than OO; you can use an OOD in an architecture, but an OOD in-and-of-itself is not an architecture.
Magmai Kai Holmlor
- The disgruntled & disillusioned
Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Try looking up articles in a search engine about "the benefits of object oriented programming", etc. Personally, I used to find it overkill, but that was before I appreciated the benefits. Now I do 90% of my work in an OO manner. All I can say, is that you learn it better if you can see a good and clear reason to do so, rather than just treating it as a second way of doing the same thing and wondering why you would need it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement