Temporarily disable all purity for debug prints
bearophile
bearophileHUGS at lycos.com
Mon Apr 11 15:48:02 PDT 2011
Adam D. Ruppe:
> Yes. In fact, I view it as better than always seeing it twenty
> times because it reflects what's actually going on.
To avoid some possible troubles I suggest to keep puts pure only in debug builds:
debug
extern(C) pure void puts(const char*);
else
extern(C) void puts(const char*);
pure void hello() {
debug puts("hello world from pure land\n");
}
void main() {
hello();
}
Bye,
bearophile
More information about the Digitalmars-d
mailing list