Logging and caching are (usually) acceptable side effects

Good software development practice includes the elimination of side effects. Side effects make it hard to reason about the implementation.

While eliminating side effects is a worthy goal, two types of side effects are commonplace, and often expected:

These two types of side effects are so commonplace that they might not be called side effects, but rather intended primary effects.

Exceptions exist for both types of side effects, however. A (very small) list of examples:

There are no other clearly acceptable types of side effects. (At least not that I have been able to think of.)

Note last edited November 2023.
Incoming links: Software development.