Document Usage Assumptions [DI16] [WHAT]

Document Usage Assumptions [DI16] [WHAT]

Tip DI16

Some functions may have restrictions on how they can be used or guidelines on how they can best be used. In such cases, document those assumptions so that users can properly use a function.

Common usage assumptions include:

  • State of parameters

  • State of data in a class

  • Order in which functions should be called

  • External side effects

The following examples demonstrate how some basic function summaries can be extended to include important usage assumptions:

Code in the zone ad.png