logoalt Hacker News

glitchcyesterday at 2:34 PM2 repliesview on HN

Why is OOP lumped with Clean Code? Objects are useful for managing complex states and relationships. They are complementary, not mutually exclusive, to procedural and functional programming.


Replies

array_key_firstyesterday at 5:02 PM

Usually when people refer to OOP they don't mean encapsulation, although that's the core tenant of OOP. Encapsulation, private and public etc is a given. Usually they're talking about the other OOP stuff, like inheritance. Inheritance is pretty much bad and is the wrong abstraction for 90% of stuff.

kdfjgbdfkjgbyesterday at 2:36 PM

I think they meant "OOP patterns". Not that I agree with them