OxL Reference

§5. Expressions

In this chapter

5.1 General rulesAlmost everything is an expression
5.2 Precedence and associativityPrecedence and associativity
5.3 Overloading and user-defined operatorsOverloading built-in operators — op declarations in impl
5.4 ConditionsThere is no ternary operator.
5.5 Pattern matchingA match MUST be exhaustive.
5.6 Loopsfor 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 expressionsdefer e — executes e on leaving the block (including on fail, return, cancellation), in the reverse order of declaration.
5.9 Query expressionsForm: from x in source (where e)\* (order by e (asc|desc)?, …)?

Source: docs/spec/oxl-standard.en.md