4 ms·
The whole idea of OOP is you have mutable data coupled with the methods that mutate it.
by odyssey7 5y ago
The whole idea of OOP is you have mutable data coupled with the methods that mutate it.
- cryptonector 5y agoYou can do immutable data structures with OOP. The problem is that you can also do mutation.
- zdragnar 5y agoCompilers / runtimes for most OOP languages don't really put the same level of optimization into operations with immutable structures as they do with mutable ones, because the mutable paradigm is largely how the languages are (intended to be) used. There are exceptions, of course, but you are leaving a lot on the table when you try to shoehorn one into the other.