Purity (D2 standard libraries / object.d)

Walter Bright newshound1 at digitalmars.com
Fri Jan 9 12:34:56 PST 2009


Jason House wrote:
> When considering the standard library changes, I realized that
> object.d could change. I believe a pure opCmp or toString could break
> user code with impure versions of those functions. Would that kind of
> a change to object.d cause any real problems for D2 users?

As Andrei pointed out, the trouble with making the Object functions pure 
is if you want to do an override that caches its value.



More information about the Digitalmars-d mailing list