|
|
|
|
|
by Chris2048
3646 days ago
|
|
Allowing the extra constraint "doesn't have a side effect" is more dangerous than clarity in this case because it increases what a dev needs to know to modify the code, and allows for a bug to easily be introduced if the validate code is modified to have side-effects. And though a test might be added to check for this, "Was this function run" is easier to determine than "Does this function have side-effects". |
|