It is an argument, not a trojan horse!
Let's talk about something cool: trojan horse parameters.
This is how I call this fancy technique which many of us, developers, might have used (or still doing). Ok, so what is it?
As a daily work, you face a problem, think about a solution and start...
blog.medunes.net5 min read
Ivan Nikulin
From my experience, the main problem with flag parameters is not that you have two I dependant logic in a function. The problem that such parameters "slightly" change behavior. For instance, a flag that tell to send an email with results. Or flag that require to skip (or run) validation. And so on.