A function should only do one thing. If flags are used as a function’s parameters, the function is doing more than one thing.
When you find yourself using flags as a way to run different code, consider splitting your function into different functions.
2 thoughts on “Avoid Using Flags as a Function’s Parameters”
Hello
Please add me to mailing list
Hi Bharath, have you tried to subscribe to the mailing list?
Comments are closed.