[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: idempotent (was Re: exif --remove not idempotent, and a Debian man page bug)



On 2022-09-25, Emanuel Berg <incal@dataswamp.org> wrote:
> The Wanderer wrote:
>
>> If the nature of operation O is such that objects B and
>> C are guaranteed to always be identical, no matter what
>> object A was, then operation O is categorized as
>> being idempotent.
>
> It has to do with the number of times it is applied,
>
> abs(x) = abs(abs(x)) = abs..(abs(abs(x)))

That's the example given on the Wikipedia page on the subject, I think.
It has the merit of being comprehensible even to me.

> The same!
>
> This is the math definition, my use case of the word was
> applied programming so it cannot be _exactly_ like that.

One "programming" example given on that same Wikipedia page was that if
you applied an update operation to Lutz Mueller's email address in a
database (*ich habe Kopfschmerzen*!) that same update applied a second
or third time (ad infinitum) would produce identical results.

> Well, maybe in Haskell it can ...


Reply to: