Essay · Apr 02, 2026 · 1 min read

LLMs are compilers that forgot their type system

very few years I find myself reaching for the same metaphor, and every few years it breaks in a new place. Right now the metaphor is this: large language models are compilers that forgot their type system.

We feed them prompts instead of well-defined ASTs. They output streams of tokens instead of predictable machine code. The result is a magical layer of abstraction that works 90% of the time, and fails spectacularly during the last 10%.

What we actually need isn’t more layers of “prompt engineering.” We need strict schemas, structural enforcement, and guarantees. A return to types.

def generate(prompt, model):
    # where the types went to die
    tokens = model.tokenize(prompt)
    out = []
    # ...

The future of language models in production isn’t open-ended conversation. It’s strictly typed function calling.

Filed under:↵ Back to home