Should we look at the real world when we decide on immutability?
There is a strong [argument][1] to make objects Immutable. So should we always pine for immutability where possible, or look to the real-world when deciding whether something should be immutable?

Example: A card game. Is a "Deck of Cards" immutable? We have two choices:

 1. Deck is immutable. All methods (shuffle, deal-one) return a reference to a new deck object.
 2. Deck is mutable. All methods mutate the current deck.

It would be nice to make the deck immutable. We would gain the benefits described in the link above. But in the real world, a deck isn't immutable - we shuffle and get "the same" deck of cards but in a different order.


  [1]: http://stackoverflow.com/a/214718/177238
Should we look at the real world when we decide on immutability?
===

There is a strong [argument][1] to make objects Immutable. So should we always pine for immutability where possible, or look to the real-world when deciding whether something should be immutable?

Example: A card game. Is a "Deck of Cards" immutable? We have two choices:

 1. Deck is immutable. All methods (shuffle, deal-one) return a reference to a new deck object.
 2. Deck is mutable. All methods mutate the current deck.

It would be nice to make the deck immutable. We would gain the benefits described in the link above. But in the real world, a deck isn't immutable - we shuffle and get "the same" deck of cards but in a different order.


  [1]: http://stackoverflow.com/a/214718/177238