3 ms·
>dealing with immutable data in OO languages is tedious and error prone I don't think this is a problem ingrained in OO. You could very easily conceive of an "
by clusmore 10y ago
>dealing with immutable data in OO languages is tedious and error prone
I don't think this is a problem ingrained in OO. You could very easily conceive of an "OO" language that has separate constructs for objects (mutable) and data (immutable) and there would be no problem at all. Immutable data just happens to be common in functional languages but there's no reason you couldn't introduce it to an "OO" language.
- willtim 10y agoThe most recent OO-branded attempt at this was Scala. I certainly found it rather tedious and error prone compared to Haskell or OCaml.