I'm sorry. I don't understand the point of the exercise.
First, what kind of data are you talking about? Are you talking about data value? Data record? Data object with identity?
Second, are you saying database records being mutable cannot model Bush was a president once Obama has become president?
I don't know the reason for the aversion to mutable data record/object. Both mutable and immutable data record/objects have their places in modeling real world objects.
Can you give some specific examples of bugs stemming from mismanagement of mutable state? Some examples on bugs resulted from the failure to coordinate state changes or poorly-designed state changes? And how the immutable data solve the problems?
There are literally too many to list. But if I just had to pick some recent ones:
* A dropdown on a web form that displays a different value than is returned (failure to coordinate the displayed value and the "actual" value)
* Logins remain locked after resetting a password (failure to change a value from "locked" to "not locked", instead of "is the user locked?" being a function of history)
* If you navigate to a business object from a list, and perform an action (via HTTP POST) on that object, you can accidentally perform the same action on other objects from that list through refreshing or clicking multiple times (since the "current" object is in the session state)
* Bugs that only happen when you navigate to a page from a certain other page (because the destination page depends on certain session state that was not set, instead of being a simple function of URL parameters)
Not that I don't believe you. It's just that I want to learn from specific examples on what kind of problems people encounter when dealing with mutable data and how would immutable data solve the problems.
So how would immutable data solve the above problems? Thanks.
First, what kind of data are you talking about? Are you talking about data value? Data record? Data object with identity?
Second, are you saying database records being mutable cannot model Bush was a president once Obama has become president?
I don't know the reason for the aversion to mutable data record/object. Both mutable and immutable data record/objects have their places in modeling real world objects.