On 7 April 2012 08:09, Walter Bright <[email protected]> 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. _______________________________________________ dmd-beta mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-beta
