File tree 2 files changed +17
-14
lines changed
2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,16 @@ expression might perform actions other than simply returning a value.
48
48
49
49
### Expression-Oriented Language
50
50
51
- In early programming languages [ expressions] and [ statements ] were two separate
52
- syntactic categories: expressions had a value and statements did things.
53
- However, later languages blurred this distinction, allowing expressions to do
54
- things and statements to have a value. In an expression-oriented language,
55
- (nearly) every statement is an expression and therefore returns a value.
56
- Consequently these expression statements can themselves form part of larger
57
- expressions.
58
-
59
- [ expressions ] : glossary.html#expression
60
- [ statements ] : glossary.html#statement
51
+ In early programming languages [ expressions] [ expression ] and
52
+ [ statements ] [ statement ] were two separate syntactic categories: expressions had
53
+ a value and statements did things. However, later languages blurred this
54
+ distinction, allowing expressions to do things and statements to have a value.
55
+ In an expression-oriented language, (nearly) every statement is an expression
56
+ and therefore returns a value. Consequently these expression statements can
57
+ themselves form part of larger expressions.
58
+
59
+ [ expression ] : glossary.html#expression
60
+ [ statement ] : glossary.html#statement
61
61
62
62
### Statement
63
63
Original file line number Diff line number Diff line change @@ -111,10 +111,13 @@ string to the screen. Easy enough!
111
111
112
112
[ allocation ] : the-stack-and-the-heap.html
113
113
114
- Finally, the line ends with a semicolon (` ; ` ). Rust is an ‘expression oriented’
115
- language, which means that most things are expressions, rather than statements.
116
- The ` ; ` is used to indicate that this expression is over, and the next one is
117
- ready to begin. Most lines of Rust code end with a ` ; ` .
114
+ Finally, the line ends with a semicolon (` ; ` ). Rust is an [ ‘expression oriented’
115
+ language] [ expression-oriented language ] , which means that most things are
116
+ expressions, rather than statements. The ` ; ` is used to indicate that this
117
+ expression is over, and the next one is ready to begin. Most lines of Rust code
118
+ end with a ` ; ` .
119
+
120
+ [ expression-oriented language ] : glossary.html#expression-oriented-language
118
121
119
122
Finally, actually compiling and running our program. We can compile with our
120
123
compiler, ` rustc ` , by passing it the name of our source file:
You can’t perform that action at this time.
0 commit comments