Reference
Keywords
These words are reserved — they can't be used as names. Keywords are
lowercase and case-sensitive (HTTP methods are uppercase by convention).
Declarations & bindings
| Keyword | Role |
create | Declare a variable, or instantiate from a class |
as | Binds a value in create … as … |
from | create x from Class — instantiation |
function | Declare a function |
with | Introduce parameters, a request body, or a message |
give back | Return a value from a function |
Control flow
| Keyword | Role |
if | Conditional |
else | else / else-if (else if …) |
repeat … times | Counted loop |
while | Conditional loop |
for each … in | Collection iteration |
end | Universal block terminator |
Operators (word form)
| Keyword | Role |
is | Equality / comparison lead-in |
not | Negation; is not, is not equal to |
less / greater / than | is less than, is greater than [or equal to] |
equal / to | is equal to, … or equal to |
and / or | Logical conjunction / disjunction |
modulo | Remainder operator |
I/O & collections
| Keyword | Role |
show | Print to standard output |
add … to | Append to a list |
Classes (OOP)
| Keyword | Role |
class | Declare a class |
has | Declare a field |
public | A member reachable from anywhere (the default) |
protected | A member visible to the class and its subclasses |
private | A member visible only to its declaring class |
extends | Inheritance |
Web services
| Keyword | Role |
controller … at | Declare a stateless HTTP route group (controller Products at "/products") |
web | Compose controllers, own pipeline/health/lifecycle (web ProductApi … use Products … end) |
service | Business-logic component with methods, state, and dependency injection |
on | Route declaration (on GET "/") |
publish … on port | Start a web block |
status | give back status N |
message | … with message … |
ok / created / accepted / no content | Success response shorthands (give back ok data) |
GET / POST / PUT / PATCH / DELETE | HTTP methods |
Security
| Keyword | Role |
restrict to | Authorization guard |
otherwise | The fallback branch of a guard — restrict … otherwise, require … otherwise, protect … otherwise error |
secure | Attach an auth provider |
using | secure … using Passkey |
Concurrency
| Keyword | Role |
start task | Start a function in the background (start task X) |
wait for | Wait for a started function to finish |
cancel | Cancel a function that hasn't run yet |
send … to | Send a message to a channel |
receive from | Receive a message from a channel |
after … seconds | Run a block once after a delay (after 5 seconds … end) |
every … seconds, N times | Run a block on an interval, N times |
… up to N seconds | Bound a send / receive with a timeout |
Error recovery
| Keyword | Role |
try | Begin a recoverable block (try … catch … end) |
catch | Introduce a recovery block; catch error binds the caught error |
catch Kind as error | A filtered clause matching one error kind (first match wins) |
finally | A block that always runs, on success or failure |
throw | Raise an error of your own |
Async execution
| Keyword | Role |
async function | Declare an awaitable function; calling it returns a handle |
wait for | Await a handle and yield its give-back value (an expression) |
Enterprise application layer
| Keyword | Role |
record … end | Declare a DTO with validation rules (record CreateUserRequest … end) |
validate x | Validate a record — a fail-fast statement or a result-yielding expression |
repository … end | A data-access component with async, injectable methods |
service … use … function … | Business logic with injected dependencies and callable methods |
application … use … end | The dependency-injection composition root |
use Name [as singleton|scoped|transient] | Inject a dependency / register a component |
Configuration, secrets & environment
| Keyword | Role |
configuration … end | Declare a typed settings schema (configuration AppConfig … end) |
has … as … [is …] | A setting: name, type (text/whole/number/truth/list/map/secret), optional default |
secret | A setting type whose value is redacted everywhere but reveal(...) |
reveal | The one explicit, auditable way to read a secret's value |
use AppConfig | Inject the loaded configuration into a service or application |
Middleware & request pipeline
| Keyword | Role |
pipeline … end | A service's ordered request pipeline, composed around every route |
step … with request … end | Declare a reusable custom step; run it with use Name |
next(request) | Continue to the rest of the pipeline (an injected value, not a keyword) |
catch errors | A failing route answers 500 instead of crashing |
allow origins "…" / allow any origin | CORS: set Access-Control-Allow-Origin |
add correlation id | Reuse or generate an X-Correlation-Id per request |
limit N requests per second|minute|hour | Fixed-window rate limit — 429 when exceeded |
limit request size to N kilobytes | Reject an over-large body with 413 |
log requests | A structured record per request to the host's injected sink |
compress responses | Mark gzip when the client accepts it (transport encodes) |
Advanced authorization
| Keyword | Role |
policy … end | Declare an authorization policy (a named set of requirements) |
require authentication | The principal must be signed in |
require role "…" or "…" | The principal holds one of the roles (permissions likewise) |
require claim "name" is "value" | A claim on the principal matches |
require policy Other | Compose another (parameterless) policy — its whole decision must grant |
with order | Declare a policy's resources; the guard passes them the same way |
check … end | Custom decision code — user is the principal; fails closed |
restrict to policy Name otherwise … | Enforce a policy with the existing authorization guard |
claim("name") | Built-in that reads the current principal's claim (or nothing) |
Background processing
| Keyword | Role |
job Name [in queue "…"] … end | Declare a background job (queued, never called; a failing run is contained) |
with a, b | Job parameters, bound from the queue statement's arguments |
retry 3 times [waiting 30 seconds] | Re-run a failing job; the final failure is a dead-letter log event |
queue Name [with args] | Enqueue one run — it executes when the script ends or before the response returns |
queue Name after 5 minutes | Defer the run on the deterministic timeline (seconds / minutes / hours) |
schedule Name every 15 minutes | Recurring runs — also every day at "03:00" and every monday at "09:00" |
jobs_pending() / jobs_failed() / queue_pending("…") | Built-ins that read the queue state (failed = the dead-letter count) |
job_workers | Host setting: 0 turns serve's background pumping off; 1+ pumps between requests |
Messaging & event bus
| Keyword | Role |
event Name … end | Declare a message contract (event UserRegistered … has field … end) |
handler Name for Event [with e] … end | Subscribe to an event; a failing delivery is contained |
retry N times [waiting M seconds] | A handler's delivery-retry / dead-letter policy (same as a job) |
use Name | Inject a service / repository / configuration into a handler |
publish Event [with field value, …] | Raise an event — fans out to every subscriber onto the background queue |
events_published() / handlers_pending() / events_failed() | Built-ins that read the bus (failed = dead-letters) |
Enterprise hardening
| Keyword | Role |
require value [otherwise "msg"] | Fail-fast precondition — fails when the value is false or nothing (ZX3300) |
on startup … end / on shutdown … end | Service lifecycle hooks — startup runs before serving (fail-fast), shutdown on stop |
ready … end | Readiness probe — registers GET /ready (ok / failing verdicts, like health) |
resilience Name … end | A named policy: timeout N seconds, retry N times [waiting M], break after N failures for M seconds |
protect with Name … [otherwise [error]] … end | Run a block under a resilience policy (retry / timeout / circuit breaker) |
uptime_seconds() / memory_used() | Production diagnostics built-ins |
Logging & observability
| Keyword | Role |
log debug|info|warning|error msg [with { … }] | Emit a structured log event (destinations come from configuration) |
count "name" | Add one to a named counter |
measure "name" as value | Record a numeric measurement |
audit "event" [with { … }] | An always-recorded business event carrying the acting principal |
health … end | A service's health check, auto-registered as GET /health (200/503) |
give back ok / failing "reason" | The health verdict (recognized only inside a health block) |
metric_count / metric_values | Built-ins that read the metric registry back |
Data layer (ORM)
| Keyword | Role |
database … end | Declare a database (provider, connection, table … from Class) |
table … from | Map a class to a table |
save … into | Insert or update an item |
find all from | Query every row as a list |
find one from … where … is … | Query the first matching item, or nothing |
where … is greater than / contains / and / or | Rich conditions — reuse the comparison words plus text operators |
sorted by field [descending] [then by …] | Order results (stable sort, multiple keys) |
skip N / first N | Pagination — offset and limit on find all |
find count / find any from | How many rows match (number) / whether any match (truth) |
sum / average / minimum / maximum of field from | Numeric aggregates over the matching rows |
delete … from | Remove an item |
transaction on … catch error … end | Commit on success, roll back on a recoverable error |
Schema migrations
| Keyword | Role |
migration Name … end | An ordered, recorded schema change (create table / add / remove / rename field) |
create table T from Class | A migration step: create the table from a class |
add field f to T / remove field f from T | A migration step: add or drop a column |
rename field a to b in T | A migration step: rename a column, keeping its data |
migrate DB | Apply pending migrations, then the automatic additive diff (in one transaction) |
rollback DB | Reverse the most recently applied migration (a remove is irreversible) |
migrate on open | A database line: auto-apply pending migrations as it opens |
Native deployment & hosting
| Keyword | Role |
deployment Name … end | Describe how a finished app ships (host-neutral) |
serves ServiceName | The service this deployment runs |
target linux | windows | The host platform (default linux) |
reverse proxy nginx | caddy | none | The proxy in front of the app (default none) |
domain "…" / port N | The public domain and the port the app listens on |
Modules & visibility
| Keyword | Role |
module | Name a file's module (module Products) |
import | Bring in another module (import Math) |
showing | Import specific symbols (import Math showing square) |
public | Export a declaration from its module |
private | Keep a declaration inside its module (also a field modifier) |
Testing
| Keyword | Role |
test | Declare a test (test "adds numbers") |
expect | Start an assertion |
to | expect … to … (matcher lead-in) |
equal | expect … to equal expected |
be | expect … to be true / false / nothing |
contain | expect list or text to contain an item |
throw | expect an expression to throw |
Literals
| Keyword | Role |
true / false | Boolean values |
nothing | Absence of a value (null) |