Can we just have struct inheritence already?
Timon Gehr
timon.gehr at gmx.ch
Fri Jun 14 12:18:07 UTC 2019
On 14.06.19 05:22, Walter Bright wrote:
> On 6/13/2019 6:05 PM, Timon Gehr wrote:
>> If the result is mutable, there should be no common subexpression
>> elimination because it affects aliasing, but for immutable results,
>> the compiler should be allowed to pool identical values at its own
>> leisure. (Note that this is not currently done.)
>
> I've suspected for a long time that the value of pure functions is not
> CSE, but the knowledge that there aren't side effects. Side effects are
> the bane of understanding code.
>
So you would argue that `pure` functions should be able to read global
mutable state?
More information about the Digitalmars-d
mailing list