· 2 min read ·

What Building a Programming Language with Claude Code Actually Tells Us

Source: lobsters

Building a programming language is one of the more structurally demanding things you can do in software. A lexer feeds a parser, which produces an AST, which gets walked by an interpreter or lowered to bytecode. Each layer has invariants that the next layer depends on. Get something subtly wrong in your token representation and you’ll be chasing phantom bugs in your evaluator two weeks later.

So I found this writeup about building a programming language using Claude Code genuinely interesting, not because AI-assisted coding is novel at this point, but because language implementation is one of the better stress tests for it.

Most AI coding benchmarks involve isolated, self-contained problems: implement a sorting algorithm, fix a bug in a function, write a test. A language implementation is the opposite of that. It’s a system where everything is connected, where the shape of a decision made in the parser echoes through the evaluator, where refactoring one data structure means touching fifteen files in coordinated ways.

Claude Code, Anthropic’s agentic CLI tool, is designed for exactly this kind of multi-file, multi-step work. It can read a whole codebase, plan changes, execute them, and iterate. The question that actually matters here is whether it can maintain coherence across a project with real structural depth.

From what I understand of how these builds tend to go, the answer is: mostly yes, with caveats. The agent handles the boilerplate well. Recursive descent parsers have a fairly regular shape, and generating the skeleton of one is exactly the kind of task where pattern-matching on training data pays off. Scope handling, environments, closures, these are well-documented problems with well-documented solutions, and the model has seen a lot of that documentation.

Where things get harder is in the decisions that aren’t boilerplate. Choosing how to represent your value type, deciding whether to walk the AST directly or compile to an intermediate representation, figuring out where to put error recovery logic. These are design decisions, and design decisions have downstream consequences that aren’t always visible at the time you make them.

An AI coding agent will make a choice and move forward. It won’t necessarily flag that the choice it made optimizes for short-term coherence at the expense of something you’ll want later. That’s not a knock on Claude Code specifically; it’s a property of any tool that produces confident, locally-coherent output.

What this project illustrates is something worth taking seriously: AI coding tools are genuinely useful for the parts of language implementation that are mechanical, and language implementation has more mechanical parts than people assume. But the interesting work, the part where you decide what kind of language you’re actually building and why, that still requires a human who has opinions and is willing to defend them.

Using Claude Code to build a language is a reasonable choice. Using it as a substitute for understanding what you’re building is a different thing entirely, and the distinction matters more here than it does in most other domains.

Was this interesting?