Store mutable indirections in immutable data with this one weird trick!

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sat Nov 13 09:56:16 UTC 2021


On Saturday, 13 November 2021 at 09:37:41 UTC, Timon Gehr wrote:
> Yes, the documentation around qualifiers is pretty incomplete 
> in general, which is one of the problems plaguing this 
> discussion. The specification does clearly state that Paul's 
> trick is not allowed though.
>
> NB: This is the relevant bit of DMD source code:
> https://github.com/dlang/dmd/blob/master/src/dmd/dcast.d#L856-L872

D needs to stop adding weirdness. If you want strong purity, 
define it, give it an explicit signifier.



More information about the Digitalmars-d mailing list