Proposal: Relax rules for 'pure'

bearophile bearophileHUGS at lycos.com
Mon Oct 25 09:34:44 PDT 2010


Bruno Medeiros:

> Robert Jacques:
>> Weakly-pure functions, don't provide either of
> > these guarantees, but allow a much larger number of functions to be
> > strongly-pure.
>> ...
> I think we need to be more realistic with what kinds of optimizations
> we could expect from a D compiler and pure functions.


Partally unrelated: in DMD 2.050 I think it's possible to have both std.algorithm.swap and std.algorithm.sort weakly pure. So I am able to sort data even in a strongly pure function :-) This is an important change.

Bye,
bearophile


More information about the Digitalmars-d mailing list