3 ms·
From the article (and follows my experience): "Const parameters and const functions are helpful in avoiding side effect related bugs, but the functions are sti
by cmroanirgo 8y ago
From the article (and follows my experience):
"Const parameters and const functions are helpful in avoiding side effect related bugs, but the functions are still susceptible to changes in the global execution environment. Trying to make more parameters and functions const is a good exercise, and often ends in casting it away in frustration at some point. That frustration is usually due to finding all sorts of places that state could be modified that weren't immediately obvious -- places for bugs to breed. "