3 ms·
You can do immutable data structures with OOP. The problem is that you can also do mutation.
by cryptonector 5y ago
You 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.