Subject: Re: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?

From: Mattias Engdegård <[email-masked]>
Date: Fri, 3 Jul 2020 11:25:30 +0200

2 juli 2020 kl. 21.09 skrev Philipp Stephani <[email-masked]>:

> I don't think most of those are pure, as they have to "look into" an
> object. For example, the result of "equal" does not only depend on the
> argument objects, but also the objects they refer to.

Unless I'm mistaken, they are pure enough for the purpose of constant folding, where the arguments are already known (constant) at compile-time; do come with a counter-example if you disagree.

Were you thinking about other uses of pure functions? Perhaps our notion of purity is underspecified.