2 ms·
I agree things that can be immutable should be, but so much functionality requires mutability. State has to change, or the internet will be a very boring place.
by cortesoft 6y ago
I agree things that can be immutable should be, but so much functionality requires mutability. State has to change, or the internet will be a very boring place. If I am shopping, I need to be able to buy something... Facebook users need to be able to post their updates, upload photos,etc.
Am I missing something, or do all of these use cases preclude immutability?
- deleted 6y ago[deleted]
- AriaMinaei 6y agoI think it's about delaying the side-effect until `transaction.commit()`, and implementing as much of the business-logic as possible to happen inside the transaction. Virtual worlds (a model of the real world) could also be useful. Like, let the side effect run in the virtual world and let me inspect that virtual world. Here, "me" could be a programmer figuring out how to code against your API, or some ML thing trying to figure out how to make two APIs talk to one another.