I'm not sure who "he" is, the OP or me? Neither of us are remarking on pure functions, and the OP's suggestions were largely impure (e.g., a global mutable variable to change whenever you might want a different Pi value?). Generally I prefer pure functions, but I'm not religious about it. For example, if the function in question is a method on an object which needs to modify some state in the object, that's all well and good. Just make it explicit that the function has side effects and those side effects are scoped to the object and its methods.