Re:Functional programming in C++ (2012)
by halter73 on Tuesday December 29, 2020 @05:06AM
(#25568380)
> in imperative programming, a subroutine with side effects is idempotent if the system state remains the same after one or several calls
https://en.wikipedia.org/wiki/Idempotence#Computer_science_m...
Re:Functional programming in C++ (2012)
by thewakalix on Tuesday December 29, 2020 @06:02AM
(#25568666)
It’s used commonly when working with unreliable communication (e.g. networking). For example, if you make a request but you don’t get a response, either the request or the response might have failed to send. It’s convenient if you don’t need to determine which case occurred; idempotent functions free you from worrying about whether the requested action was carried out.
where have you ever seen that definition ?!