Side Effect (computer Science) Article Index for
Side Effect
Limousines in
Side
Website Links For
Side Effect
 

Information About

Side Effect (computer Science)




Imperative Programming is known for employing side effects to make programs function. Functional Programming in turn is known for its minimization of side effects.

In CPU design, instruction side effects are those instructions which modify internal CPU values without explicitly stating it - for instance, generally the instruction ADD may or may not modify condition variables (carry, zero, overflow, etc). This causes a problem when designing a CPU that has an Instruction Pipeline and supports instructions with side-effects. Care must be taken to avoid this Hazard - it is possible to avoid by limiting the instruction set to instructions without side effects or in the worst case having additional control circuitry to detect the side effects and stall the pipeline if the next instruction depends on the values.


REFERENTIAL TRANSPARENCY

See Also: Referential transparency


Being side-effect free is necessary but not sufficient for referential transparency. Referential transparency means that an expression (such as a function call) can be replaced with the value; this requires that the expression has no side effects ''and'' is Pure (always returns the same results on the same input).


SEE ALSO