Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.

src/components/dynamic-operators.x

Dynamic operators.

Design notes

An operation with a Var operand that no protocol member resolved lowers to the dynamic runtime. A binary operator boxes both operands for Var.binary; a compound assignment, increment, or decrement calls the update helper of its target’s storage, which takes the target’s address once and stores once.

Each definition precedes the definitions that call it: the compiler settles whether a linked copy reaches a compile-time operation when the copy binds.