Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualachild

Posted 19 December 2012 - 09:32 AM

As was mentioned - remember it's one of many tools, and tools, while they can be typically used for just about anything, are usually specialized for certain things. (I could go cut a board in half with a screwdriver, given enough time, but better to use the saw for that and use the screwdriver for what it's meant for.)

OOP tends to be a good fit for self-contained black-boxes that don't (usually) know about the inner workings of each other. This allows them to be highly reusable for many situations. A fantastic example is a GUI system.

Procedural programming tends to shine when it comes to algorithms and complicated ... procedures. Take code for reading/writing JPEGs for instance. I've seen this done with minor use of OOP (by Intel, in fact) and it was very awkward. I've also seen it done fully procedurally, and it is just easier to follow.

Data Oriented Design is another way of thinking that is getting a lot more attention lately (it is nothing new though). This has more to do with layout and memory structure being the first thing on your mind, and so can then be wrapped up in whatever little package you want, whether it is using OOP idiom, PP idiom, or something else.
(Note that just because you use SoA does not mean it isn't wrapped up in a nice neat little object)

There's also functional programming, stack based programming, event based programming, etc... but most of all you will find what works best and what doesn't - and more importantly why, as you get more experience. So even if you just keep doing what you're doing, and pure OOP comes back and bites you hard, it's good - that's how you must usually learn!

#1achild

Posted 19 December 2012 - 09:31 AM

As was mentioned - remember it's one of many tools, and tools, while they can be typically used for just about anything, are usually specialized for certain things. (I could go cut a board in half with a screwdriver, given enough time, but better to use the saw for that and use the screwdriver for what it's meant for.)

OOP tends to be a good fit for self-contained black-boxes that don't (usually) know about the inner workings of each other. This allows them to be highly reusable for many situations. A fantastic example is a GUI system.

Procedural programming tends to shine when it comes to algorithms and complicated ... procedures. Take code for reading/writing JPEGs for instance. I've seen this done with minor use of OOP (by Intel, in fact) and it was very awkward. I've also seen it done fully procedurally, and it is just easier to follow.

Data Oriented Design is another way of thinking that is getting a lot more attention lately (it is nothing new though). This has more to do with layout and memory structure being the first thing on your mind, and so can then be wrapped up in whatever little package you want, whether it is using OOP idiom, PP idiom, or something else.

There's also functional programming, stack based programming, event based programming, etc... but most of all you will find what works best and what doesn't - and more importantly why, as you get more experience. So even if you just keep doing what you're doing, and pure OOP comes back and bites you hard, it's good - that's how you must usually learn!

PARTNERS