Memory annotations#
The Swan language supports memory annotations to specify how data is stored and accessed in memory.
Annotation |
Description |
Class |
|---|---|---|
! expr |
Bang unary operator for duplicate permission |
|
var_id * [: type] |
Starred input which value can be modified in place by an output. |
|
var_id at ID [: type] |
Output variable which value is stored at a specific memory location, corresponding to an input. |
|
(expr with * modifier {{ ; modifier }} [[ ; ]]) |
Copy with modification, replacing functional update. |
|
(expr at ID) |
Expression stored at a specific memory location. |
|