Design patterns·Functional ideas that went mainstream
the function returned a number and also wrote a row, and the second half is not in the signature anywhere.
Side effect
Also calledeffect, impure operation
Anything a function does beyond computing its result: writing to storage, mutating an argument, logging, reading the clock, sending a request. Side effects are the entire point of a program — a pure program with no effects does nothing observable — so the goal is never to eliminate them but to keep them out of the parts you want to reason about. Naming them is what makes the distinction discussable in a review.