3 ms·
I think the question in 2021 is more "why would anyone use OOP at all, compared to other techniques, outside of a few niche use cases?" (though I agree OOP can
by drcode 6y ago
I think the question in 2021 is more "why would anyone use OOP at all, compared to other techniques, outside of a few niche use cases?" (though I agree OOP can be very useful in niche use cases where having lots of scattered state makes sense, such as when writing a UI component library)
- x0hm 6y agoYou can achieve immutability with OOP. Other paradigms just emphasize it more. I agree, though, that mutability is detrimental, and that traditional OOP can easily lead us to believe that state is not a concern. I do not believe that this is a problem inherent to OOP, rather it's a problem of paradigmatic implementation.