To help LDC/GDC

deadalnix deadalnix at gmail.com
Tue Apr 9 18:37:34 PDT 2013


On Tuesday, 9 April 2013 at 17:39:47 UTC, Dicebot wrote:
> On Tuesday, 9 April 2013 at 16:15:38 UTC, Andrei Alexandrescu 
> wrote:
>>> "weak pure" is useful only to implement "strong pure". 
>>> "strong pure" is
>>> useful only if it can be statically enforced to provide some 
>>> guarantees.
>>> "strong pure" is useless because it shares same annotation 
>>> with "weak
>>> pure".
>>
>> I think it's a great design, very useful and innovative.
>
> Agree on it being great and innovative. But I fail to see 
> usefulness with current design. Can you provide examples how 
> current pure design allows for better code / optimizations?

Strongly pure functions can call weakly pure function while 
keeping its properties.

So it loosen the constraint on strongly pure function while 
keeping the benefit.


More information about the Digitalmars-d mailing list