DEV Community

Discussion on: OOP vs Functional Programming

Collapse
 
kant312 profile image
Quentin Delcourt

To me OOP is not about encapsulating state (although you can do that of course), but rather encapsulating data with behaviour. The fact that these data should be immutable or not depend on the software needs, but I think most of the time we should err on the side of immutability.
TL;DR, I don't think using OOP should force you to have mutability everywhere.