Not because it reads elegantly to a human — because a model can reliably generate it, verify it, and manipulate it.
The bottleneck of AI-written code isn't taste — it's trust. A model is strongest at producing constrained structure and weakest at guaranteeing runtime semantics. Scheme's value for AI is that its structure lines up with the first and hands the second to a machine. That points to an optimum that looks different from the one you'd pick for a human.
async, a forgotten await.
An s-expr is syntactically valid the moment its parens balance — the
error surface shrinks by an order of magnitude.(define-message …) declaration and the macro expands it to
correct code. The model writes intent — short, clear, checkable — and
the compiler writes the implementation. That's the division of labour
it's least likely to botch.This is the part that's genuinely specific to AI. Generated code is not to be believed; it has to be proven. Scheme makes the proof cheap and automatic.
stage1 == stage2 must hold byte-for-byte, on
every change. An oracle that automatically rejects a wrong edit is worth
more than any amount of "well-written."(equal? x (read (open-input-string (write‑>string x))))
is a correctness check the model gets for nothing.The biggest risk in AI-written network code is the protocol: fields out of order, an encoder that doesn't match its decoder, a state machine missing a transition — the kind of thing that only detonates at runtime. Scheme moves it forward in time.
reads and
writes. No protocol, no protocol bug. For the thing a
model is most likely to get wrong, the best move is to delete it.define-json /
define-message schema rather than a hand-written codec —
and the test checks symmetry directly: (decode (encode x)) = x.Declarative protocol & schema, plus automatic differential and
round-trip verification. The model emits short, declarative,
structurally-valid intent — schemas, routes, sx
templates; macros produce the implementation; the machine proves it
correct. Work lands on the model's strength; risk lands on the verifier.
Models have seen orders of magnitude more JavaScript, so their intuitive recall for it is stronger; writing Scheme leans harder on the verification scaffolding above to catch what recall would have caught for free. JavaScript is the language a model remembers better — but Scheme has the properties that matter for code that must be verified anyway, provided you actually build the loop. Here, it's built: differential testing, the self-hosting fixpoint, and read/write round-trips.
And the ecosystem gap is narrower than it looks, because you don't have
to leave the JavaScript world to enter Goeteia. Its (web js)
FFI bridge reaches straight into the host: a port can call into any
existing JavaScript library — the whole npm-scale ecosystem stays one call
away, seamlessly. You verify the code you write; you borrow, unchanged, the
libraries the world already wrote.