# Why a Mainstream Formally Verifiable Language Is Harder Than It Looks

Original title: So You Want to Build a Mainstream Formally Verifiable Language

> Hacker News story 50687017 · language: en · submitted 2026-11-29
> Web version: https://zeli.app/story/50687017
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 69 · by [mpweiher](<https://news.ycombinator.com/user?id=mpweiher>) · 💬 36
[original](<https://danilafe.com/blog/verifiable_language/>) · [HN discussion](<https://news.ycombinator.com/item?id=50687017>)

## Summary

Formal verification tools keep proving their worth, so why isn't there a mainstream language built for it? Drawing on years of experience with Coq and Agda, the author maps the obstacles: specifications that can be wrong even when proofs succeed, the tangle of object and meta languages, and mainstream languages whose semantics are too messy to reason about. He lays out open questions for anyone hoping to build one.

## Key quote

> It proved the code matches the spec, but is it the spec we wanted?

## HN discussion (36 comments)

### [smj-edison](<https://news.ycombinator.com/item?id=50689051>)

> I think there's a pretty big conceptual difference between programming and math, which is that in programming we think about building up something over time by applying successive steps. In math though we have to think about the whole thing simultaneously, forwards and backwards. So when we prove a program, we're actually proving it forwards and backwards, with all possible inputs and outputs, at the same time. And either it's all true, or it blows up in your face.
>
> Another difficulty is with programming, we succeed by making abstractions that don't leak, where with math we're constantly opening up mathematical objects and messing around with their internals, chaining together the internals with theorems to get to our desired outcome.
>
> Since we so often need access to the guts of the objects we're working with to prove facts, it makes it really hard to interoperate with other systems, because either we have to make assumptions about those systems which can compromise correctness or we have to be able to plug in all the way.
>
> Signed, an undergrad in math with decent coding experience.

### [nylonstrung](<https://news.ycombinator.com/item?id=50690128>)

> We don't need a new verifiable language, everyone trying to build new ones is suffering from NIH in my opinion.
>
> Lean is already an extremely powerful and performant FP whose capability is essentially a superset of all other FPs and which has the most powerful metaprogramming and DSL building features outside of Racket
>
> It has massive, likely insurmountable network effects in terms of the lemmas already written for it which can be reused in general purpose contexts
>
> What we need is more libraries, frameworks, contributions to Core and Batteries which make it more useful outside of the domain of pure proofs and mathematics which has obviously been the focus so far.

### [tiffanyh](<https://news.ycombinator.com/item?id=50687827>)

> I’m surprised SPARK programing language was never mentioned.
>
> https://en.wikipedia.org/wiki/SPARK_(programming_language)
>
> https://www.adacore.com/languages/spark

### [dnautics](<https://news.ycombinator.com/item?id=50690333>)

> One of the most interesting things is how Sel4 works -- IIUC they compile to arm64 assembler, and then run verification proofs on that.
>
> Inspired by that, I think that an interesting place to patch verification in to an existing language is at the IR level.  At the IR level, you have usually (effectively) a highly-regularized schema for all operations, that is usually still embued with semantic information (for example: the function you called is "malloc") that can be used to generate invariants that you'd like to prove (or refute).
>
> Of course you still have to trust that the IR->ASM part of the compiler is good, but at least the program logic has been verified.

### [kccqzy](<https://news.ycombinator.com/item?id=50688226>)

> \> I believe that one crucial distinction is preventing the meteoric ascent of AI in software of the formally verified kind: the everpresence of change.
>
> This is actually also what I realized after a year or so in industry. (I was quite enamored of formal verification in college.)

---

## Cite

- Page: https://zeli.app/story/50687017
- Date: 2026-11-29
- Source: danilafe.com (https://danilafe.com/blog/verifiable_language/)
- Hacker News: https://news.ycombinator.com/item?id=50687017

## Other languages

- zh: https://zeli.app/zh/story/50687017 · markdown: https://zeli.app/zh/story/50687017.md
- ja: https://zeli.app/ja/story/50687017 · markdown: https://zeli.app/ja/story/50687017.md
- ko: https://zeli.app/ko/story/50687017 · markdown: https://zeli.app/ko/story/50687017.md
- de: https://zeli.app/de/story/50687017 · markdown: https://zeli.app/de/story/50687017.md
- es: https://zeli.app/es/story/50687017 · markdown: https://zeli.app/es/story/50687017.md
- ru: https://zeli.app/ru/story/50687017 · markdown: https://zeli.app/ru/story/50687017.md
