LLMs compared to compilers

A popular social post framed large language models as a ‘natural‑language transpiler’—essentially turning human prompts into higher‑level code-like outputs—a comparison that resonated enough to rack up 1,975 views and modest engagement. (x.com).

A compiler is a program that turns one kind of code into another kind of code, usually from a language humans write into instructions computers can run. A transpiler does a narrower job: it rewrites source code into different source code at roughly the same level, like TypeScript into JavaScript. (geeksforgeeks.org) Large language models do something that looks similar on the surface. OpenAI’s documentation says a prompt is input to a model, and the model can return prose, code, mathematical notation, or structured JavaScript Object Notation data. (openai.com) That is why people reach for the compiler analogy. You type an English request like “write a Python script that reads a comma-separated values file,” and the model often emits a more formal artifact that another machine can execute or check. (openai.com) The analogy gets stronger when the output format is tightly specified. OpenAI’s Structured Outputs tools are built around making model responses follow a schema, which makes the result look less like freeform chat and more like a translation target with rules. (openai.com) But compilers have a property most large language models do not: determinism. If you run the same compiler on the same source code, you expect the same result every time, while model outputs can vary with sampling settings, context, and even small wording changes in the prompt. (openai.com) Compilers also preserve meaning with much stricter guarantees. A transpiler is supposed to keep the program’s behavior equivalent across languages, while a large language model can silently invent a library call, drop an edge case, or misunderstand an ambiguous sentence. (geeksforgeeks.org) Researchers are now testing whether models can move closer to real compiler work instead of just resembling it. A 2024 paper from the Association for Computational Linguistics studied whether large language models could translate C programs into x86 assembly, which is the low-level instruction set used by many chips. (aclanthology.org) That line of research sits next to an older idea from Andrej Karpathy, who argued in 2017 that training a neural network is like compiling a dataset into model weights. In that framing, the “program” is no longer handwritten code but a learned bundle of numbers shaped by examples. (medium.com) Put together, the social-post comparison lands because it captures a real shift in how software gets made. For many tasks in 2026, the first draft is no longer written directly in Python or JavaScript but in English, and the large language model is the messy translator sitting between human intent and machine-readable output. (openai.com)

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.