vyrn

Ownership, consume, regions

A parameter states what a function does with the value. The compiler enforces it and frees the memory. There is no collector, no lifetime syntax, and no borrow annotation.

Capabilities

A parameter carries a capability. read observes the value and the caller keeps it. modify changes it in place. consume takes ownership, and the caller may not name the value again.

The words are erased before the program runs. They cost nothing, and they are the only ownership syntax there is.

Use a consumed value again and the compiler names the line that took it: `t` is used here but was already consumed by `redeem(..)` on line 7.

seats 2 redeemed 7

Regions

A region block frees a group of allocations at its closing brace. It suits a loop that builds temporary values: one release for the whole block instead of one per value.

A value that must outlive the block is returned from it, and the caller owns what comes out. Storing an arena value into a binding that outlives the region is a compile error.

The editor's hover reports, for every binding, whether it is reclaimed, how, and why not when it is not.

1000 strings built, widest 8 bytes, all freed at the brace