To help LDC/GDC
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Apr 10 08:37:15 PDT 2013
On 4/10/13 7:29 AM, Dicebot wrote:
> On Wednesday, 10 April 2013 at 11:22:41 UTC, deadalnix wrote:
>> On Wednesday, 10 April 2013 at 08:19:26 UTC, Dicebot wrote:
>>> On Wednesday, 10 April 2013 at 01:37:35 UTC, deadalnix wrote:
>>>>> 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.
>>>
>>> It does not answer my question. Why "pure" keyword is useful in D if
>>> it does not guarantee that compiler will verify functional purity of
>>> you code and does not guarantee relevant optimizations?
>>>
>>> Beauty of concept is useless without practical application.
>>
>> It isn't beauty of concept. Strongly pure function exhibit from an
>> external point of view the properties of pure as in functional
>> programming.
>
> Except you can't be sure that your function is strongly pure with
> current design.
I would venture that you are being confused. This seems to indicate
insufficient documentation for 'pure'.
Andrei
More information about the Digitalmars-d
mailing list