Strategies

If your function exposes multiple implementation strategies, make those explicit through a single argument that takes an enumeration. This makes it clear how to control the operation of your function and extends gracefully if you discover new strategies in the future.

This part of the book goes into some of the details of and variations on this pattern:

See also