On Wednesday, 10 April 2013 at 15:48:43 UTC, Timon Gehr wrote:
On 04/10/2013 05:43 PM, deadalnix wrote:
On Wednesday, 10 April 2013 at 11:29:42 UTC, Dicebot wrote:
Except you can't be sure that your function is strongly pure with current design. Add ref parameter into the mix by accident and it will
silently change to weak pure which is useless by its own.

pure + immutable and value parameters == strongly pure (as in
functional). It is really that simple.

pure notEntirely(){
    return new Object();
}

auto x = notEntirely();
assert(x is x);
assert(notEntirely() !is notEntirely());

Yes, that is the entity vs value I discussed above n that thread. I should have said parameters AND return is a value.

Reply via email to