Temporarily disable all purity for debug prints

Walter Bright newshound2 at digitalmars.com
Fri Apr 15 16:57:36 PDT 2011


On 4/15/2011 3:00 PM, bearophile wrote:
> I presume this front end change is not following my suggestion (of adding a
> switch to disable purity), but adds a dirty hack that allows impure debug
> code inside pure functions. If this is true, then let's now find the bad side
> effects of this change.

On the contrary, I think it is the right solution. After all, the reason people 
want to put impure code in a pure function is for debugging. By putting it under 
the debug conditional, any logging or printing code can be there without needing 
the compiler to be aware of what they do.


More information about the Digitalmars-d mailing list