Building a language for agents: Blood makes regex and SQL typos compile-time errors
kitlangton · x · 2026-11-09
kitlangton shared sketches of Blood, a new programming language built around a single comptime primitive: a function that runs while code is checked and returns a type.
- Regexes are parsed at compile time, with named capture groups becoming typed fields — a typo'd capture name is a compile error with a did-you-mean hint
- Constants are checked before the program runs: type Port = u16 where 1 <= self rejects assigning 0 at compile time
- The same primitive powers routing, typed SQL queries (misspelled column names fail at compile time) and format strings, all written as ordinary Blood code
In a thread, davidcrawshaw argued now is the time to design programming languages for agents, with compile time as the focus. kitlangton explained Blood's content-addressable design tracks dependencies and regenerates the minimum amount, with plans for an interpreted mode for instant feedback, an LLVM backend for release builds, and possibly Cranelift dev builds.
Related event: Blood: A New Programming Language Built for Agents(2 posts)→
More from coding & agent
- Continual Learning Touted as December's Biggest AI Story as Third Moment Runs 10,000 Agents — haider1 · 2026-11-09
- Stanford's CS146S opens its AI-native engineering syllabus as coding agents finish homework in one prompt — Latent Space · 2026-11-09
- Telling your coding agent 'go refactor while I grab coffee' is the new workflow meme — shakoistsLog · 2026-11-09
- 20 computer-use AI agents compared: open frameworks vs managed services in 2026 — TheTuringPost · 2026-11-09
- Dev says Opus 4.5's task delegation and parallel scheduling may beat his own — lucasmeijer · 2026-11-09
- Debloating a Hisense TV with Claude Code over ADB — no root, 14 apps disabled — SeanOliver · 2026-11-09