|
|
|
|
|
by noblethrasher
4153 days ago
|
|
Immutability was never incompatible with OOP, just the opposite in fact. Even Alan Kay often criticized languages like C++ and Java for encouraging the use of setters and, thus, “turning objects back into data structures”. C# is still one of my favorite languages (even though I use F# most of the time now), but I do admire Java for making it significantly more painful to write mutable rather than immutable classes; it's too bad that fact was lost on so many programmers. Kudos for sharing the Rich Hickey video; it's one of my favorites of all time. |
|
Out of curiosity, how does it do that? As far as I know, everything in Java is mutable by default.