www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Temporarily disable all purity for debug prints


 Interesting (and practical) idea.

It's one example of a third class of compiler messages that I have named compiler tips (beside warnings and errors).
 The only problems I see are templated 
 functions (for which pure, nothrow, etc. are so broken it's not even 
 funny) and finding functions that could be marked as pure if the 
 implicitly pure functions they call were marked as pure.  For example:

C language is simpler than C++/D2 and I presume it's acceptable for the compiler to be conservative and not spot all function that are implicitly pure, but only some of them. Bye, bearophile
Apr 11 2011