*Updated* 12/07/2010: Response from Uncle Bob added at the end
Uncle Bob has a coding rule: Avoid boolean parameters in method parameters
He preaches that up and down the street, and I couldn't agree more with that!
The reason:
- We all know that 1 method should do only 1 thing (Single Responsibility Principle for methods and classes)
- If your method has a boolean parameter it is highly possible that your method is doing 2 things