The need for a formally verifiable mainstream programming language blainehansen....

@best

The need for a formally verifiable mainstream programming language blainehansen.me · 85 points · 55 comments · HN thread

TL;DR Blaine Hansen argues that LLM-driven code growth is degrading software quality and that formal verification must become mainstream engineering practice. He proposes a pragmatic new language, Magmide, with a familiar mainstream syntax and proving capabilities added incrementally, rather than a verification-first system built from scratch. The article's own links were broken, and the HN thread is largely skeptical that a new language is the right route.

  • The author says software quality is declining because LLMs accelerate existing sloppy practices, and argues that formal verification must be adopted broadly, not by a small group of researchers.
  • He notes that proof assistants can confirm proofs are correct, but someone still has to check that theorem statements capture the intended behaviour.
  • Earlier Magmide plans (a new proof assistant and assembly-level base language) were judged too ambitious, so the revised plan is a simpler, mainstream-looking language that adds proving features bottom-up.
  • He draws an analogy to Deno, which adds a permissions layer on top of JavaScript/TypeScript and was adopted by security-minded engineers.
  • He argues that relying on future superintelligence to solve these problems is a poor bet and that engineers should take responsibility now.

Discussion The thread is skeptical and fairly argumentative. Many commenters push back that formal verification proves only conformance to a spec, not that the spec is right, and cite TLA+ examples with mixed results. Others point to existing tools (Dafny, Verus, SPARK, Frama-C, Lean-based projects) and suggest the author's goal already has partial answers. Several commenters mock the LLM-driven framing and the philosophical tone, while a few sympathetically note that verification is becoming more relevant as machine-generated code grows.

  • Formal verification can't fix sloppy or disorganised code (many): Several commenters argue that slop is mainly about organisation, aesthetics and vague requirements, which formal proofs don't address. They prefer restrictive frameworks and testing first.
  • Existing verification tools and languages already cover this (many): Commenters list Dafny, SPARK Ada, Verus, Frama-C, Why3, Quint and Lean-based projects, arguing that a new language is unnecessary and that extending existing languages like Rust or C is more realistic.
  • Mainstream adoption comes from usability, not a 'mainstream' label (some): One commenter argues that a language becomes mainstream through adoption, so the goal should be verifiability, ergonomics and accessibility, and asks why earlier verification languages did not catch on.
  • Specifications and the real world are the real limit (some): Commenters note that proofs only show a program matches a spec, that the spec may not match reality, and that formal methods pay off mainly in narrow domains.
  • Verification is becoming necessary because of AI-generated code (some): A minority argue that once most code is machine-written, verification becomes the bottleneck, and formal methods are a reasonable way to gain confidence.
  • Discipline and process matter more than new tools (a few): One practitioner reports good results from disciplined AI-assisted development with specs, TDD and review, arguing the existing toolkit is enough if used properly.
  • The article is hype or philosophising (a few): Some commenters find the piece overheated, note broken links in the post, and dislike the LLM-based civilisational framing.

Links from the comments

#formalVerification #LLMs #programmingLanguages #softwareQuality #TLAplus