Hacker News new | ask | show | jobs
by Hendrikto 47 days ago
> That's why if x is state then f can never be purely idempotent

That is simply not true. f could be, for example, “set x.variable to 7”, which is definitely idempotent.

1 comments

There's no side effects in f here, so the statement does not apply
Parent said

> State is in practice always subjected to side effects and concurrency.

There was never any claim or assumption regarding f. Maybe the way you interpreted it is what they meant, but it is not what was stated.

you are oversimplifying with your set variable example. the context is complex state management as with online purchases.