Side effects

A side-effect is a change in the state of a running T system, such as a change in the value stored in some location, or an effect on the outside world.

Many useful programs can be written which make no use of side-effects. In principle, side-effects other than those controlling the outside world are unnecessary. However, side effects, when used carefully, can be used to promote program modularity and readability. In addition, they may be necessary in a T implementation to obtain efficient program execution.



Subsections