Original Post
Is OOP better for developing games and why it is better? I like to hear your opinion [smile] Thanks
Quote:
Original post by arithma
@MarkS: When you have a collection of objects that are almost of the same type but need a little bit of specialized behavior, what technique do you use to specialize that behavior? In OOP land the usual approach would be creating an interface for whatever you are going to iterate over, then deriving from that and overriding where you need to create specialized behavior.
Quote:Delegates/closures/callbacks and conditional branching over data.
Original post by arithma
When you have a collection of objects that are almost of the same type but need a little bit of specialized behavior, what technique do you use to specialize that behavior? In OOP land the usual approach would be creating an interface for whatever you are going to iterate over, then deriving from that and overriding where you need to create specialized behavior.
Quote:
Original post by MarkS
I'm learning C++, but I will always prefer C. I can do exactly the same thing in both languages, but I find C to be much easier, more intuitive and far less obfuscated.
Quote:
Original post by MarkS
For instance, rather than inlining an entire function in multiple places, I use the inline function operator.
Quote:
Original post by Yann L
Maybe you should look into a different OO language, such as C# or even Java. They're farther away from C, and might make it easier for you to understand the real benefits of OOP.
Quote:
Original post by Yann L
Note that the inline keyword is mostly ignored by modern compilers.
Quote:
Original post by MarkS
No, I want to stick with C/C++. Java doesn't have much use outside of the internet (some, yes, but not much) and I refuse to touch C# on principle. *Maybe* when it becomes standardized, but not right now. I am not a fan of interpreted languages, even when a VM is being used.
Quote:
Original post by MarkS
No, I want to stick with C/C++.
Quote:
Java doesn't have much use outside of the internet (some, yes, but not much)
Quote:This isn't quite true. Most compilers have 3 options to consider inlining candidates: no inlining, functions marked inline, all functions. As a practical matter I haven't found a reason not to pick the last one, in which case the inline keyword does almost nothing.
Original post by Zahlman Quote:
Quote:
Original post by Yann L
Note that the inline keyword is mostly ignored by modern compilers.
Well that sucks! Good to know though.
Quote:
Original post by MarkS
No, I want to stick with C/C++.
Quote:
mrchrismnh
I guess they should call it an inLIE func cause they tell you it's going to do all these things that it doesn't.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more