conv text and pure
Daniel Davidson
nospam at spam.com
Wed Oct 23 12:55:25 PDT 2013
Should text be pure?
I have multiple enforce statements of the form:
enforce(0 == _history.length ||
!binaryFun!(orderingPred)(additional,
_history[$-1]),
text(V.stringof, " must be added in chronological
order, but ",
additional, " comes before ", _history[$-1]));
and I was hoping that statement would not be the reason for
keeping the containing function from being pure.
Is there a simple work around?
Regarding pure in general:
- Is there a global list of standard functions that are in the
queue for this designation? (or is every function taking a
separate issue)
- Where does (or should) purity fall in terms of priority?
- Isn't it the case that unnecessary, forced impurity is like a
plague, once it starts the spread is rapid. In general, have most
developers given up on its benefit in their code now preferring
/* pure */?
Thanks
Dan
More information about the Digitalmars-d-learn
mailing list