Hello Paul, On Sun, 28 Dec 2025 10:35:59 -0800, Paul Eggert wrote:
> On 2025-12-28 00:57, Jₑₙₛ Gustedt wrote: > >> Why is f not idempotent if there's no requirement that f must > >> return? > > Because replacing a call `f(x)` with two calls `(f(x), f(x))` has > > the program behave differently. > > Yes, that's a normal English-language meaning of "idempotent". But > it's not C23's definition. C23's definition does not directly say > anything like "has the program behave differently". Instead, it > refers to "observable state" and this use of "observable" follows a > previous-paragraph definition of "observable" - which "observable > state" could reasonably be seen to referring to (though apparently > not?). I think it was more meant to refer to the observable behavior of the program. Perhaps this should be changed to something like ... or the observable <del>state</del> <ins>behavior</ins> of <del>the</del> <ins>an</ins> execution. Thanks Jₑₙₛ -- :: ICube :::::::::::::::::::::::::::::: deputy director :: :: Université de Strasbourg :::::::::::::::::::::: ICPS :: :: INRIA antenne de Strasbourg :::::::::::::::::: Camus :: :: INRIA PIQ program Strasbourg :::::::::: piq.inria.fr :: :: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 :: :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
