~/ hasil@local
online

Compilers are just string manipulation with anxiety

Hasil T · 2026-03-14 · 16 min read · programming

I built a toy compiler over a long weekend. Lexer, parser, type-checker, bytecode VM. I expected the parser to be the hard part. I was wrong.

The hard part was the type-checker. Specifically, the part where you realise that “what does this expression evaluate to” and “what type is this expression” are subtly different questions, and you have been answering one when you should have been answering the other.

#compilers#rust