Comment by gpderetta
3 years ago
My point was simply that at some point the buck stops and someone has to write the code to mutate a memory cell.
Regarding your point, shared xor mutable is nice, but databases are an example of a shared mutable (and even concurrent!) yet safe resource, so other models are possible.
> databases are an example
Yes, it is possible because programmers have accepted the bargain that they must write purely-functional SQL.
Then the db is able to decide how best to optimise/apply/retry/copy-on-write/abort as necessary.
If SQL allowed you to directly mutate things, it would break everything. You couldn't 'LIMIT 10' if your loop might want to increment some data in row 40082.