Expression (computer science)

Syntactic entity in a programming language that may be evaluated to determine its value

Expression is often contrasted with statement—a syntactic entity that has no value (an instruction).

Note that the formal notion of a side effect is a change to the abstract state of the running program.

Another class of side effects are changes to the concrete state of the computational system, such as loading data into cache memories. Languages that are often described as "side effect–free" will generally still have concrete side effects that can be exploited, for example, in side-channel attacks.

It depends on the particular programming language specification whether an expression with no abstract side effects can legally be eliminated from the execution path by the processing environment in which the expression is evaluated.