While implementing a new feature, I came across the flag parameter anti-pattern in two unrelated places. I would like to take this as an opportunity to take a closer look at this anti-pattern.
A simple example
Lets assume we want to load all PDF documents via an API method. This could look like this: