Pros. / Cons. of Immutability vs. Mutability

Viewed 15141

Well, I guess it's clear the direction from which I am trying to reason about this. There is a lot of talk these days about the virtues of immutability (constness) whenever possible. The Concurrent programming in Java book talks a lot about this too.

However, all this is just what I've read about. I personally, haven't coded much in Functional languages. And it looks very surprising to me that it is possible to work comfortably with immutable objects. Theoretically, it is definitely possible. But, from a practical point of view, is a very comfortable experience. Or what is the new kind of reasoning (for FP) that I must develop so that I don't need mutability so much.

I would appreciate how to think about writing programs when you are forced to use immutable objects.

  • Already making this a Community Wiki ... for all those who are interested in closing this question or marking this as subjective ... etc. etc. ... *
6 Answers
Related