Peter Stuifzand Notes on software, small tools, and the open web.
19:03

Remove flag argument

In reply to refactoring.com/catalog/removeFlagArgument.html

If a function takes a boolean argument, it is possible to copy the function and set the variable to true in the first function and to false in the second function. Then you can propagate the value down. This often makes it possible to simplify the code.