(August 30, 2017 at 11:12 pm)bennyboy Wrote:(August 30, 2017 at 9:37 pm)KevinM1 Wrote: OOP is civilization. Once you understand that composition is the way to go rather than inheritance, it makes a lot more sense.
Oh no you di'n't!
Not to overstate it, I'd say programmers who insist on absolutes (function rather than OOP, or composition rather than inheritance) are either comp sci undergrads or crazy people.
The correct answer is: understand what you want to achieve, and use the tools that will a) allow you to get the job at hand done efficiently; b) not be likely to screw you later when the boss suddenly says, "Okay, we're adding a new superpower, and we need to be able to define how every object we've ever created will interact with it by next Monday's update."
Well, yeah. Of course only use the right tool for the right job. OOP generally comes with a fair amount of overhead that makes it prohibitive to use in small projects (not necessarily performance overhead, but wasted development time due to setting up dependency injection, factories, front controllers, etc.).
That said, for me personally, I often find it easier to think in OOP terms than procedural terms.
I should also note that my particular background is programming for the web, so I'm essentially limited to the stateless HTTP request/response cycle. I have no idea about the world of persistent memory, or what the differences are between that and what I do.
"I was thirsty for everything, but blood wasn't my style" - Live, "Voodoo Lady"