IT lexicon › Programming › Expression

Expression

Programming På svenska → Updated: 2026-05-24

A code construct that evaluates to a value — 2 + 3, foo(), x ? a : b. Opposite: statement.

Rust's mantra "everything is an expression" is consistent — blocks, if, match, loops all return values. Pure expressions have no side effects. Lazy expressions (Haskell) only evaluate if the value is actually used.

← Back to the lexicon