Purity
bearophile
bearophileHUGS at lycos.com
Fri Feb 11 10:01:53 PST 2011
Bruno Medeiros:
> Hum, it might still be useful to have something like a compiler switch
> that disables pure altogether, then people could use I/O and other
> non-pure operations for debugging purposes. One could wrap such code
> with a version statement:
>
> void myPurefunc(Foo foo) pure {
> version(pure_disabled) {
> writeln("some debug info: ", foo);
> }
> //...
This seems an interesting idea to help debug pure functions.
Bye,
bearophile
More information about the Digitalmars-d
mailing list