Conditional expression
`condition ? value_if_true : value_if_false`: the value of one expression or the other, by a condition, as in JavaScript and PHP. The condition is any expression but another conditional (parenthesize one to nest it there); the two values may themselves be conditionals, which group to the right. Only the chosen value is evaluated. (2026-11-01, roadmap S4)
Runs on: either side: the compiler places the statement that calls it where the values it uses live.
Format:
condition ? expression : expression
Examples
label = qty > 0 ? "In stock" : "Sold out"
who = item.owner == me ? "You" : item.owner