Purity (D2 standard libraries / object.d)

Jason House jason.james.house at gmail.com
Fri Jan 9 05:56:41 PST 2009


In the latest D2, both the frontend and backend support use and optimization when user code declares pure code. This isn't particularly useful when pure functions can't call standard library code.

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?

Are there other ambiguous purity options when converting the standard libraries? Which parts of Phobos/druntime would you expect to be pure/impure?



More information about the Digitalmars-d mailing list