Skip to content
Source: Declare

🧩Declare Ships a Small UI Language With a Compiler That Explains Its Errors

Your UI code could finally be checked like a database query

TL;DR

Declare is a domain-specific UI language, SQL-style in spirit, with a compiler that checks programs and names broken rules. Its real apps run 568 to 3,529 lines per view. If you build custom interfaces and want code that humans and AI can both debug, it's worth a look.

Declare is a new UI language that treats interfaces like queries: small, declarative, and checked by a compiler before anything ships. Instead of hand-wiring layout, motion, states, theming, and drawing across scattered files, you describe the interface in one domain-specific language and let the compiler tell you what's wrong. Why should you care? Because the compiler doesn't just fail, it explains. Its diagnostics name the broken rule and suggest valid rewrites, and an Inspector can show live values and dependencies. That matters if you're debugging a custom design at 2 a.m., or handing generated code to an AI assistant and needing output you can actually verify. The proof is in the sample apps. The calendar view runs 568 lines of code with 228 comments. The desktop view is 3,529 lines with 2,011 comments and 264 KB over the wire. The tracker view is 1,508 lines with 983 comments and 194 KB over the wire. The language is intentionally small, with a formal six-rung ladder for proving correctness. What to watch: whether a language this small can carry real production weight. The team built it eval by eval, so the bet is measured, not proven.

Declare Ships a Small UI Language With a Compiler That Explains Its Errors — Declare

Key Points

1

The calendar view is 568 lines of code plus 228 comments, a compact footprint for a full interface built entirely in Declare's domain-specific language.

Keep reading — it's free

Enter your email to keep reading — plus the best of AI & tech, daily. Free, forever.

Also get
or

Already a member? Sign in

DeclareDSLUI DevelopmentCompilersVerifiable Code

Comments

Subscribe to join the conversation...

Be the first to comment