3 Not every Rustacean has a background in systems programming, nor in computer
4 science, so we've added explanations of terms that might be unfamiliar.
6 ### Abstract Syntax Tree
8 When a compiler is compiling your program, it does a number of different things.
9 One of the things that it does is turn the text of your program into an
10 ‘abstract syntax tree’, or ‘AST’. This tree is a representation of the structure
11 of your program. For example, `2 + 3` can be turned into a tree:
19 And `2 + (3 * 4)` would look like this:
31 Arity refers to the number of arguments a function or operation takes.
39 In the example above `x` and `y` have arity 2. `z` has arity 3.
43 Bounds are constraints on a type or [trait][traits]. For example, if a bound
44 is placed on the argument a function takes, types passed to that function
45 must abide by that constraint.
49 ### DST (Dynamically Sized Type)
51 A type without a statically known size or alignment. ([more info][link])
53 [link]: ../nomicon/exotic-sizes.html#dynamically-sized-types-dsts
57 In computer programming, an expression is a combination of values, constants,
58 variables, operators and functions that evaluate to a single value. For example,
59 `2 + (3 * 4)` is an expression that returns the value 14. It is worth noting
60 that expressions can have side-effects. For example, a function included in an
61 expression might perform actions other than simply returning a value.
63 ### Expression-Oriented Language
65 In early programming languages, [expressions][expression] and
66 [statements][statement] were two separate syntactic categories: expressions had
67 a value and statements did things. However, later languages blurred this
68 distinction, allowing expressions to do things and statements to have a value.
69 In an expression-oriented language, (nearly) every statement is an expression
70 and therefore returns a value. Consequently, these expression statements can
71 themselves form part of larger expressions.
73 [expression]: glossary.html#expression
74 [statement]: glossary.html#statement
78 In computer programming, a statement is the smallest standalone element of a
79 programming language that commands a computer to perform an action.