To help LDC/GDC
Timon Gehr
timon.gehr at gmx.ch
Wed Apr 10 08:48:43 PDT 2013
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());
More information about the Digitalmars-d
mailing list