News for hackers. Stuff that matters.
Re:Heard of Idempotency but unsure what it is? by happytoexplain on Monday June 10, 2024 @07:47PM (#40640652)
>What matters is whether N calls to the function changes the state differently than a single call.

I thought "any 2" would be the relevant subset of "N" that you can use to define idempotency in simpler terms. Also, I'm using the phrase "mutate state" as shorthand for your "change state differently", I think. I.e. if two things both change state, then by definition they changed it "differently". If two things both set x to 1, the second one didn't "change state".

>there's an implicit temporal component ... idempotent over long periods

This sounds a bit like what I mentioned about other things touching state between calls to your idempotent function.

Maybe I meant the same thing as you, but used different words?

There are no comments on this comment yet.