pure vs writeln debugging

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Sun Feb 9 16:48:08 PST 2014


On Sunday, 9 February 2014 at 00:18:28 UTC, Nick Sabalausky wrote:
> On 2/8/2014 5:30 PM, Adam D. Ruppe wrote:
>> On Saturday, 8 February 2014 at 22:27:39 UTC, Nick Sabalausky 
>> wrote:
>>> Is there some way to poke enough of a hole in "pure" to get 
>>> some
>>> writeln debugging statements in?
>>
>> literally write
>> debug writeln(..)
>>
>> abnd it should work in the pure function
>
> Nice!
>
> So I take it purity enforcement is disabled with the -debug 
> flag? Or is it some sort of hack with writeln?

It is a compiler benefit.

Wish it would work with @safe and nothrow too, granted writeln 
should eventually be @safe/trusted anyway.


More information about the Digitalmars-d-learn mailing list