On Fri, Apr 22, 2011 at 12:34 AM, dennis luehring <dl.so...@gmx.net> wrote:
> On 17.04.2011 22:45, Andrew Wiley wrote: > >> On Sun, Apr 17, 2011 at 3:30 PM, dennis luehring<dl.so...@gmx.net> >> wrote: >> >>> On 11.04.2011 23:27, 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). >>>> >>>> As more and more D2 functions become pure in my code and in Phobos, >>>> something like a -disablepure compiler switch (and printf/writeln inside >>>> debug{}) may allow more handy debugging with prints (if the purity is >>>> well >>>> managed by the compiler then I think disabling the pure attributes >>>> doesn't >>>> change the program output). >>>> >>>> Bye, >>>> bearophile >>>> >>> >>> sounds a little bit like the need to see an private/protected part of an >>> interface in unittest scenarios - just to be able to test it in a >>> whitebox-testing without changing the attributes of the productive-code >>> >> >> Isn't this already there because "private" makes things visible to all >> other code in the same module? >> > > ok - but what about protected? as a whitebox tester im not able(allowed) to > change productive code,but i need to test through all the code (especially > when doing code-coverage stuff) > As far as I'm aware, all the visibility levels make things visible to code in the same module.