Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computer
science, a function or expression is said to have a side effect if, in
addition to producing a value, it also modifies some state or has an
observable interaction with calling functions or the outside world. For
example, a function might modify a global or static variable, modify one
of its arguments, raise an exception, write data to a display or file,
read data, or call other side-effecting functions. In the presence of
side effects, a program's behavior depends on history; that is, the
order of evaluation matters. Because understanding an effectful program
requires thinking about all possible histories, side effects often make
a program harder to understand. Side effects are the most common way to
enable a program to interact with the outside world (people,
filesystems, other computers on networks). But the degree to which side
effects are used depends on the programming paradigm. Imperative
programming is known for uncontrolled, promiscuous use of side effects.