Pure functions in D

bearophile bearophileHUGS at lycos.com
Mon Sep 29 14:04:29 PDT 2008


Regarding the pure function topic: is it possible to have, just at debug time, the possibility to add special debugging printing statements into pure functions? :-)
Maybe now I am asking something silly... because the order of their prints and the number of times such function is called isn't defined by the compiler, and it may even change.
Another possible way to debug is for the programmer to temporary remove the "pure" statement(s), add some debugging writefln/putr/stdios, compile, run, see the output, put the "pure"(s) back, etc, etc... :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list