Using "prevent execution of method" flags
- by tpaksu
First of all I want to point out my concern with some pseudocode (I think you'll understand better)
Assume you have a global debug flag, or class variable named "debug",
class a :
var debug = FALSE
and you use it to enable debug methods. There are two types of usage it as I know:
first in a method :
method a :
if debug then call method b;
method b :
second in the method itself:
method a :
call method b;
method b :
if not debug exit
And I want to know, is there any File IO or stack pointer wise difference between these two approaches. Which usage is better, safer and why?