[dmd-beta] Fighting with 2.059 and not quite winning

Don Clugston dclugston at googlemail.com
Fri Apr 6 23:19:42 PDT 2012


On 7 April 2012 08:09, Walter Bright <walter at digitalmars.com> wrote:
>
>
> On 4/6/2012 9:04 PM, Jonathan M Davis wrote:
>>
>> My _guess_ as to why toHash now requires purity is because the current AA
>> implementation relies on it as part of the transition to proper constness
>> and purity in Object and whatnot (the implementation isn't currently
>> templated, so it can't take advantage of purity inference).
>
>
> The reason for purity is so that it can be used in functional programming
> paradigms. FP is becoming increasingly important, and we need to make the
> foundational bits of Phobos as pure as possible.

I think the challenge is that it's a bit of a chicken-and-egg
situation: some of the functions require things like toHash to be
pure, but things like toHash require the functions to be pure.
Makes it a bit hard to incrementally add pure. Might be necessary to
change everything simultaneously.


More information about the dmd-beta mailing list