
Image: David Temkin
Why it mattersAI writes code fast but cannot trust its own output. A stricter language moves more of the checking out of review and into the compiler.
A new programming language for user interfaces has landed on Hacker News. Declare, by David Temkin, makes a direct argument. A stricter language is easier for a coding agent to use than a popular one. The project reached 101 points on the HN listing.
Temkin's site is itself a Declare program. The site says it was built by a language model with no lines typed by hand. Three sample apps run inline: a calendar, a windowed desktop, and an issue tracker with one million rows.
What the samples do
The site says the calendar is 568 lines of Declare. It has four views, continuous zoom, drag, and edits that save to real data. The desktop has 2,011 lines of code. Windows drag, resize, layer, and shrink into live thumbnails. A magnifying dock holds separately loaded apps that run inside its windows. The issue tracker is 983 lines. It renders 1,000,000 rows with search-as-you-type. No code was written to virtualise the list.
Every sample is one program with no image assets, the site says. The pixels are drawn from shapes in Declare itself.
The argument the site makes
Temkin writes that AI has made writing code nearly free, but trusting it costs what it always did. An AI writing React verifies its work "by resemblance", he says. A compiler that can reject bad code is the one reviewer always present when a model writes most of it. So a language that gives the compiler more to check is more useful now, not less.
Declare bakes layout, motion, state and drawing into the language itself. Every dependency is visible to the compiler, and every value has one decider, the site says. The site lists four tools an agent uses. An installable skill holds the language, library and conventions. Diagnostics name the broken rule and the valid rewrite. An Inspector answers why a live value is what it is. A six-rung ladder proves an app from parse to pixels, one rung at a time.
The one test it reports
Temkin ran one controlled experiment. He gave the same coding agent the same ticket-buying brief twice, once in Declare and once in React. The Declare version came out at 1,279 lines. The React version was 2,666 lines. The first build that ran passed all 11 hidden checks for Declare. The React build passed six.
The site calls this "single runs, not yet a benchmark" and says every run is in the repository. A reader should treat it that way. One pair of runs with one agent on one brief is a direction, not a result.
Declare is MIT-licensed and on GitHub. The site offers a 10-minute getting started path and a one-file description of the language. A reader whose team is already deep in React does not need Declare today. The audience is a side project where a model writes most of the code.
Source
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.