Great article, Simon!
I am finding it hard to universally agree with the notion of not making functions with boolean (flag) arguments. If you had to make a different function for every variation of a method, wouldn’t you often end up with multiple functions with a lot of duplicate or similar code in them?
I suppose the obvious solution to this is to break such functions up into smaller methods, but then in some cases wouldn’t you end up with several methods where one would do that just accepts a few flags?
Would you consider it acceptable to have a parent function with flags and some simple methods to call the parent just for readability’s sake?
If you can give further clarifications or examples, that would be great!
Sr. Software Engineer @Spotify | Tech Blogger 💻 | Professional Nerd 🤓 | Musician 🎸 | https://prplcode.dev