Date: 2026-06-16
clj-zig's pipeline mixes pure transformation (parse, normalize, generate) with side effects (compile, write, load, rebind).
Signature parsing, type normalization, spec construction, and source generation are pure data transformations. Compiler invocation, filesystem writes, library loading, and Var rebinding are shell operations.
Pure cores are easy to test, compose, reuse, and inspect; the shell holds the unavoidable side effects and switches on values the core returns. This is the project's load-bearing structure.
Interleaving effects through the pipeline was the thing to avoid; it makes the core untestable without mocks and hides decisions in effectful loops.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |