(no subject)
2026-05-11 08:12#gleam
Хм. Зато вот это - логично.
Blocks are one or more expressions grouped together with curly braces. Each expression is evaluated in order and the value of the last expression is returned.
* binds more tightly than + so the expression 1 + 2 * 3 evaluates to 7. If the 1 + 2 should be evaluated first to make the expression evaluate to 9 then the expression can be wrapped in a block: { 1 + 2 } * 3. This is similar to grouping with parentheses in some other languages.
Т.е. нафига в том-же Rust отдельная сущность в виде обычных скобочек в арефметических выражениях - непонятно.
Хм. Зато вот это - логично.
Blocks are one or more expressions grouped together with curly braces. Each expression is evaluated in order and the value of the last expression is returned.
* binds more tightly than + so the expression 1 + 2 * 3 evaluates to 7. If the 1 + 2 should be evaluated first to make the expression evaluate to 9 then the expression can be wrapped in a block: { 1 + 2 } * 3. This is similar to grouping with parentheses in some other languages.
Т.е. нафига в том-же Rust отдельная сущность в виде обычных скобочек в арефметических выражениях - непонятно.