News for hackers. Stuff that matters.
Re:Heard of Idempotency but unsure what it is? by dataflow on Monday June 10, 2024 @06:43PM (#40640099)
That seems consistent with #3, I don't see how it's different. Operator or function, the name doesn't change anything?
Re:Heard of Idempotency but unsure what it is? by o11c on Monday June 10, 2024 @06:56PM (#40640225)
Operators and functions are effectively the same thing, yeah.

In CS we normally mean #4 though ... which can technically be thought of as a variation of #3 passing/returning "the whole universe" as an argument (and including the actual arguments in the implicit lambda capture), but thinking like that only makes sense for functional programmers.

Re:Heard of Idempotency but unsure what it is? by thelittleone on Monday June 10, 2024 @07:20PM (#40640438)
Passing the entire universe as an argument... dang... either that's deep conceptually, or I'm shallow, or both!
Re:Heard of Idempotency but unsure what it is? by GrantMoyer on Monday June 10, 2024 @06:58PM (#40640238)
The wikipedia definition is directly equivalent to #1. Try rewriting it with f(a, b) = a ⋅ b.

That's not to say #3 and #1 are unrelated, though.

Re:Heard of Idempotency but unsure what it is? by dataflow on Monday June 10, 2024 @07:14PM (#40640381)
Where I've been lost is where the comment said "which is that there are several different (but related) things"... if they're equivalent then isn't this just making my point?