§5. Expressions
In this chapter
| 5.1 General rules | Almost everything is an expression |
| 5.2 Precedence and associativity | Precedence and associativity |
| 5.3 Overloading and user-defined operators | Overloading built-in operators — op declarations in impl |
| 5.4 Conditions | There is no ternary operator. |
| 5.5 Pattern matching | A match MUST be exhaustive. |
| 5.6 Loops | for accepts Iterable<T> (including iter<T>, collections, ranges); for await accepts Streamable<T>. |
| 5.7 Lambdas and closures | .field and .method(args) in argument position are shorthand for a lambda with one parameter. |
| 5.8 Other expressions | defer e — executes e on leaving the block (including on fail, return, cancellation), in the reverse order of declaration. |
| 5.9 Query expressions | Form: from x in source (where e)\* (order by e (asc|desc)?, …)? |
Source: docs/spec/oxl-standard.en.md