Conditional Pure?

%u wfunction at hotmail.com
Sat Jan 22 13:37:07 PST 2011


I wanted to suggest a feature similar to inout: conditional purity. That is,
sometimes a function is pure iff the delegates passed to it are pure, and as
of right now, I don't think there's any way to document this other than by
overloading the function as a template (which results in lots of code
duplication).

The idea would be to make this a bit more general than just a particular fix
for "pure", though, since if in the future, new qualifiers arise (I guess this
might also work for @trusted and such), then the solution should work for
those too.


More information about the Digitalmars-d mailing list