On 4/16/2011 6:41 AM, bearophile wrote:
Yes, it allows one to break the purity of the function. The alternative is
to use casts (which also breaks the purity) or another compiler switch
(which also breaks the purity).

A compiler switch to disable purity doesn't break purity. It just turns all
pure functions inside the program (or inside the compilation unit) into not
pure ones. At this point you are allowed to call writeln too, safely.


Saying it is a safe way to break purity assumes that there was no purpose to the purity. There is no guaranteed safe way to break purity, with or without a compiler switch.

Reply via email to