summaryrefslogtreecommitdiffstats
path: root/src/doc/reference/src/statements-and-expressions.md
blob: b093972a94522178da0b399b54d1f394ab0de6a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
# Statements and expressions

Rust is _primarily_ an expression language. This means that most forms of
value-producing or effect-causing evaluation are directed by the uniform syntax
category of _expressions_. Each kind of expression can typically _nest_ within
each other kind of expression, and rules for evaluation of expressions involve
specifying both the value produced by the expression and the order in which its
sub-expressions are themselves evaluated.

In contrast, statements serve _mostly_ to contain and explicitly
sequence expression evaluation.