Using booleans in function API is usually considered a "code smell" as it's not obvious what's going on.    It's written about in programming books and all over the Internet, but here's a pretty decent blog post on the subject:    https://alexkondov.com/should-you-pass-boolean-to-functions/