Avoid modal routines

When you create DataBlade® module routines, avoid including arguments that make them modal; that is, the mode of the routine changes, depending on the third argument.

For example, there are a number of different ways to call a routine that computes containment of spatial values. The SimpleMap DataBlade module might implement the following routine:
Containment(polygon, polygon, integer);

This routine determines whether the first polygon contains the second polygon, or whether the second contains the first. The caller supplies an integer argument (for example, 1 or 0) to identify which value to compute; but the purpose of this argument is not immediately evident to a new user of the DataBlade module.

Consider a second design for calculating containment, as follows:
Contains(polygon, polygon) 
ContainedBy(polygon, polygon)

This design is an improvement: not only are the routines nonmodal, but the routine names also clearly explain what computation is performed.