Looking at questions such as these
- If immutable objects are good, why do people keep creating mutable objects?
- What are the drawbacks of immutable types?
- At what point do immutable classes become a burden?
- When is it inappropriate to make objects immutable?
it looks to me that people are asking "why not immutable?" and thought I'd ask another kind of question.
Let's say immutable objects are (mostly) good - even if you disagree, humor me for a sec.
As of now, there seem to be more than 6k Java projects on freecode.com. There's probably a lot that are mis-tagged, but also many more that are not listed. So let's say there at least a thousand of these. And we can safely count other ones, such as C#, that are equally relevant.
So do you have any examples of relatively successful big projects that use immutability to any reasonable degree? I mean, everyone can write baby examples showing how good everything is when it's immutable, but if there are 10k+ LOC, then that's a different story.
I can understand old projects - OK, historical burden, it would be a huge undertaking to rewrite e.g. Firefox to be mostly immutable. I can understand specialized things, e.g. Guava collections, which are designed like that from scratch. Are there examples of real-life applications, preferably new ones, that are like this? How much is "mutable Java" better / worse vs. "immutable Java" and in what aspects - but from practical standpoint?