News for hackers. Stuff that matters.
Re:Inheritance versus Composition by userbinator on Thursday May 09, 2019 @08:01AM (#19867407)
It's even harder to define (which might be why OOP is so popular --- it's easy to get dogmatic about "OOP is X", and the cargo-culters will pick it up and spread it like religion), but I'd say "be pragmatic and let it come naturally". Systems tend to naturally form OO-ish things even if they're not written in an OO language; the Linux kernel is one example. I think of OO as just another layer of organisation beyond functions and structures, arising from the desire to group related data and code together.
Re:Inheritance versus Composition by zzzcpan on Thursday May 09, 2019 @09:07AM (#19867899)
It's not natural. It depends on your previous experience. Preferring C-style semi-OO stateful programming and OO merely shows what influenced your thinking.