Hacker News new | ask | show | jobs
by codedokode 2439 days ago
What's good in immutability? If you have found that you have entered too much income and want to lower it, what do you do?
2 comments

You generate a new item altogether ( I’m talking about immutability). The positives are you’ll have an ability to keep proper records and changes done to your table which will show a different snapshots as it contained different values.

Another plus is that you won’t run into an issue like race conditions where two threads are attempting to change the same thing.

You reverse it with an adjusting entry.

What happens if you've transferred too much from your savings account into your current/cheque account? You make another transaction to adjust the initial one.

But then the taxation service can find out that you have lowered your profit to pay less taxes. So what's good in immutability?