Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDon't use flags as function parameters #235
Comments
|
The code that is calling |
|
Hmm, so at the higher level, one would probably use an if statement anyway to determine which call. Sounds good. Will try it. Thanks @jljorgenson18 ! |
Thanks for this wonderful curation of clean coding practices. I don't have so much as an issue but I'm unable to wrap my head around this rule, as to how does one split the function into two functions without actually knowing the value of temp which can be only be known with an if statement. This seems like I should use polymorphism but my question is about this particular issue as to how the functtion createFile got separated into two functions without the conditional check. I'd appreciate if anyone can throw some light on this.