On Thursday, 7 May 2015 at 14:37:14 UTC, Manfred Nowak wrote:
According to the specs
http://dlang.org/operatoroverloading.html#equals
`object.opEquals' denies to call the `opEquals'-function
tailored for the class of two objects `a' an `b' if for those
objects `a is b' holds.
Although this seems resonable and reduces boiler-plate it makes
it impossible to implement a side-effect for those cases.
I do not believe, that there is good reason to disallow
side-effects in those cases. Therefore a mechanism to enable
such side-effects should be implemented.
And why not just use another function instead of opEquals for
what you want?
- Jonathan M Davis