[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)



rhkramer wrote:

> An operation that produces the same results no matter how
> many times it is performed.

Yeah, obviously it is a term from math and in practical and
applied engineering as is programming I thought of
a definition (not really) like this

- apply once, you get the change

- apply twice, thrice, or n'ice, nothing happens since the
  change happened the first time and there is nothing to do

Stefan and Tomás can tell I know...

Anyway in math everyone understands it, and an example is the
absolute value,

abs(x) = ...

abs(abs(x)) = ...

abs..(abs(abs(x))) = ...

Same!

And that's pretty close to what I just said.

The difference if any seems to be, in math focus is on the
return value, so it is easy - is it the same or not?

Im programming, focus is "can I apply it to make sure the job
is done, and don't have to think - has it already been done? -
because if so, no matter how many times, it won't ruin it,
just nothing will happen over and over and whatever stuff it
is applied on will be in the after-applied, desired form".

That's right, right? Or am I wrong?

-- 
underground experts united
https://dataswamp.org/~incal


Reply to: