Temporarily disable all purity for debug prints

David Nadlinger see at klickverbot.at
Fri Apr 15 14:44:26 PDT 2011


On 4/11/11 11:27 PM, bearophile wrote:
>  From what I am seeing, in a D2 program if I have many (tens or more) pure functions that call to each other, and I want to add (or activate) a printf/writeln inside one (or few) of those functions to debug it, I may need to temporarily comment out the "pure" attribute of many functions (because printing can't be allowed in pure functions).

Related news: 
https://github.com/D-Programming-Language/dmd/commit/ed8068f5036f88fff1603d98ebe96bb6659bceed

David


More information about the Digitalmars-d mailing list