Having readable code doesnt mean u need to split and repeat same code. Write minimal code. Pass is self documented arguments. Imagine if you have 100s of similar kind of function much line of code would it save with good arguments.
I think the counterargument would be if you are repeating the same code over and over to avoid passing boolean as a flag, then you are probably abstracting at the wrong level. At the same time, I'm not saying passing a boolean to a function is always a bad idea. There are ways to make it more readable as I mentioned in the article.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Having readable code doesnt mean u need to split and repeat same code. Write minimal code. Pass is self documented arguments. Imagine if you have 100s of similar kind of function much line of code would it save with good arguments.
I think the counterargument would be if you are repeating the same code over and over to avoid passing boolean as a flag, then you are probably abstracting at the wrong level. At the same time, I'm not saying passing a boolean to a function is always a bad idea. There are ways to make it more readable as I mentioned in the article.