freecoding.school100% FREE · NO SIGNUP
The Seven LayersISSUE #40 of 73

R3 · packets, never globals

OMNIVSThe Silent Failure
OMNI saysR3 — packets, never globals. Pass BEs; don’t mutate shared global state.

R3 bans hidden coupling: information moves as packets (BEs returned and passed), not through global variables that anyone can read or write. This makes data flow explicit, traceable, and replayable, and it's what lets the async model (R0) work without races. A function that writes to a module-level mutable global to "communicate" violates R3 — return a packet instead.

Power-ups you unlock

The Silent Failure attacks — common mistakes

Boss battleRefactor a global-write "communication" into a returned packet.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#b388ff;font-family:monospace;padding:20px"><pre>violates R3: GLOBAL.result = x
fix: return be('cell','EXPRESS', { result: x });</pre></body></html>
▶ Open the interactive comic issue
‹ R2 · Cells Never Reach Across LayersR4 · Memory Holds Signals, Not State ›