On 27/04/12 20:39, Steven Schveighoffer wrote:
No, just make sure all the parameters and the result are either immutable or
implicitly castable to immutable (hard to explain this better).
Hm... gives me a thought that unit tests should have a helper that allows
ensuring this:
static assert(isStrongPure!fn);
Or maybe __traits(isStrongPure, fn) if it's too difficult to do in a library.
Not worth adding a strongpure (purest?) attribute to enable coders to explicitly
mark their expectations?
array bounds checks and asserts are turned off during -release compilation :)
Maybe I've misunderstood what that means, but I would still have expected the
program to stop running at least. What was it doing instead ... ? :-)