Reserved Keywords
Module & Package
| Keyword | Description |
|---|---|
coco | Module definition |
package | Package qualifier |
imports | Import packages |
pub | Public visibility in packages |
const | Constant definition |
State & Storage
| Keyword | Description |
|---|---|
state | State definition (state logic, state actor) |
logic | Logic state keyword |
actor | Actor state keyword |
Logic | Access logic state (Module.Logic.field) |
Actor | Access actor state (Module.Actor(id).field) |
Sender | Current sender identifier |
memory | Temporary variable |
storage | Storage pointer variable |
observe | Read from state |
mutate | Write to state |
gather | Load complex object from storage |
disperse | Store complex object to storage |
Endpoints & Functions
| Keyword | Description |
|---|---|
endpoint | Endpoint definition |
function | Local function definition |
deploy | Logic initialization endpoint |
enlist | Actor initialization endpoint |
dynamic | Endpoint mutates state |
static | Endpoint reads state (no mutation) |
pure | Endpoint has no state access |
Classes & Types
| Keyword | Description |
|---|---|
class | Class definition |
field | Class field |
method | Class method |
self | Reference to class instance |
make | Create new complex value |
Control Flow
| Keyword | Description |
|---|---|
if / else | Conditional |
switch / case / default | Multi-branch conditional |
for / in | Iteration |
break | Exit loop |
continue | Skip to next iteration |
return | Set output and exit |
yield | Set output (continue execution) |
pass | No operation |
throw | Throw exception |
Events
| Keyword | Description |
|---|---|
event | Event definition |
topic | Event topic field |
emit | Emit event |
Interfaces & Assets
| Keyword | Description |
|---|---|
interface | Interface definition |
asset | Asset logic / asset interface section |
Built-in Objects
| Keyword | Description |
|---|---|
Environment | Runtime environment methods |
Invocation | Current invocation methods |
Builtins | Built-in functions |
Standard Functions
| Keyword | Description |
|---|---|
len | Length of collection, string, bytes, or class |
typeof | Type name as String |
append | Add to varray |
popend | Remove and return last varray element |
merge | Combine arrays or maps |
remove | Remove key from map |
make | Create empty/default collection or class |
join | Concatenate strings or merge classes (via __join__) |
range | Generate integer sequence |
sweep | Remove empty collection from storage |
generate | Auto-create missing map keys |
polorize | Serialize value to POLO bytes |
depolorize | Deserialize POLO-encoded bytes |
Literals
| Keyword | Description |
|---|---|
true | Boolean true |
false | Boolean false |
Additional Keywords
| Keyword | Description |
|---|---|
try / catch / finally | Exception handling |
revert | Throw with revert flag |
build | Reserved |