Hacker ApprovedDepartments

Dafny

Hacker Approved

Ranked 2 of 4 verification languages by recommenders

Recommended as a simple, approachable language for proving code correct, with executable output. Critics question its developer experience and production use.

Recommended as a simple, approachable language for proving code correct, with executable output. Critics question its developer experience and production use.

27 people gave an opinion

recommend it
24
criticize it
3
approval share
89%
Each figure is one person. RecommendsCriticizes

Recommended in 12 of 13 months

  1. November 2025: recommended
  2. December 2025: recommended
  3. January 2026: recommended
  4. February 2026: recommended
  5. March 2026: recommended
  6. April 2026: recommended
  7. May 2026: recommended
  8. June 2026: recommended
  9. July 2026: recommended
  10. August 2026: recommended
  11. September 2026: recommended
  12. October 2026: recommended
  13. November 2026: not recommended (month in progress)

Why it carries the badge

  • 24 people recommend itNeeds 10 or more, met.
  • 8 recommenders for every criticNeeds 2 to 1 or better, met.
  • Recommended in 12 of 13 monthsNeeds 4 or more, met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • Simple and approachable to learn

    “For software projects it seemed very approachable, even for a complete newbie like me.”

    Comment from 30 Jul 2026 in “Are We Stuck with Lean?”

    “Dafny fits that bill quite well, it's simple, it offers refinement types”

    Comment from 16 Dec 2025 in “AI will make formal verification go mainstream”

    “Dafny is really simple. The barrier of entry is low.”

    Comment from 27 Nov 2025 in “Coq: The World's Best Macro Assembler? (2013) [pdf]”
  • Well designed, efficient verification semantics

    “Dafny's expressiveness tends to be more in the service of coherent specifications”

    Comment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

    “The semantics of Dafny is carefully designed to make verification efficient.”

    Comment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

    “The language is well designed for this.”

    Comment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”
  • Expressive specifications and invariants

    “in Dafny one can express much more complicated and complex invariants which get checked at build time”

    Comment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

    “Dafny's expressiveness tends to be more in the service of coherent specifications”

    Comment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

    “A verification language capable of enforcing invariants”

    Comment from 6 Jan 2026 in “C Is Best”
  • Named among serious verification languages

    “Lean doesn’t have a monopoly on verification languages. Dafney, Rocq, Why3, ATS, Agda, Idris… these all can do it too.”

    Comment from 4 Mar 2026 in “When AI Writes the Software, Who Verifies It?”

    “are definitely worthy of consideration”

    Comment from 27 Apr 2026 in “"Why not just use Lean?"”

    “Dafny and F* are two good showcases”

    Comment from 21 Feb 2026 in “Lean 4: How the theorem prover works and why it's the new competitive edge in AI”

Other verification languages people recommend

The three most recommended other verification languages, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

Dafny compared with 3 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
SPARK Ada632175%12—Approved
DafnyThis page24389%12—Approved
Verus23485%10—Approved
F*17385%7—Approved
See all 4 verification languages, ranked

What people said

34 of the 38 comments that mention it, newest first. Each links to the original comment.

“we should use a prover that has a lot more targets, like Danfy”

RecommendsComment from 31 Oct 2026 in “AI, Lean, and the Future of Formal Verification, with Lean Creator Leo de Moura”

“makes for an inferior developer experience in my opinion and because in general you are pretty limited in expressiveness of propositions”

CriticizesComment from 19 Sep 2026 in “Bend 2 and the Vibe-Coding Trap”

“I don't know if anyone actually uses it in production”

MixedComment from 17 Sep 2026 in “Developing provably correct Rust code with Verus”

“tooling that allows code generation based on the formal proofs like FStart or Dafny”

RecommendsComment from 17 Sep 2026 in “Developing provably correct Rust code with Verus”

“have good documentation if you want to try your hand at something”

RecommendsComment from 17 Sep 2026 in “Developing provably correct Rust code with Verus”

“For software projects it seemed very approachable, even for a complete newbie like me.”

RecommendsComment from 30 Jul 2026 in “Are We Stuck with Lean?”

“I had fun in a college class that used Dafny, building a pseudo digital wallet, it wasn't the main focus of the class, so didn't get that much out of it”

MixedComment from 29 Jun 2026 in “You Don't Know Jack About Formal Verification”

“Dafny is not Rust. Using Dafny requires porting algorithms of interest from Rust to Dafny.”

CriticizesComment from 15 Jun 2026 in “Formal Methods and the Future of Programming”

“dafny + iris are the closest to being industrial I think”

RecommendsComment from 14 Jun 2026 in “Formal Methods and the Future of Programming”

“if execution is seriously required for your problem along with strong logic on the side”

RecommendsComment from 28 Apr 2026 in “"Why not just use Lean?"”

“are definitely worthy of consideration”

RecommendsComment from 27 Apr 2026 in “"Why not just use Lean?"”

“I found it more approachable.”

RecommendsComment from 27 Apr 2026 in “"Why not just use Lean?"”

“Trying to deal with aliasing references in something like Dafny is a real pain”

CriticizesComment from 24 Apr 2026 in “Verus is a tool for verifying the correctness of code written in Rust”

“You don't need to interact with Dafny or the proofs at all.”

MixedComment from 8 Mar 2026 in “Show HN: Lemmafit: A Verifier in the AI Loop”

“Lean doesn’t have a monopoly on verification languages. Dafney, Rocq, Why3, ATS, Agda, Idris… these all can do it too.”

MixedComment from 4 Mar 2026 in “When AI Writes the Software, Who Verifies It?”

“it hits a very nice sweet spot”

MixedComment from 4 Mar 2026 in “When AI Writes the Software, Who Verifies It?”

“Looks like LLMs also find Dafny easier to write than Lean.”

RecommendsComment from 4 Mar 2026 in “When AI Writes the Software, Who Verifies It?”

“I can review Python code more quickly and accurately than Dafny”

MixedComment from 3 Mar 2026 in “When AI Writes the Software, Who Verifies It?”

“proving things correct in Dafny (for example) feels much more like programming”

RecommendsComment from 23 Feb 2026 in “Lean 4: How the theorem prover works and why it's the new competitive edge in AI”

“Dafny and F* are two good showcases”

RecommendsComment from 21 Feb 2026 in “Lean 4: How the theorem prover works and why it's the new competitive edge in AI”

“Dafny is really approachable and practical”

RecommendsComment from 19 Feb 2026 in “Learning Lean: Part 1”

“A verification language capable of enforcing invariants”

RecommendsComment from 6 Jan 2026 in “C Is Best”

“Dafny's expressiveness tends to be more in the service of coherent specifications”

RecommendsComment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

“the mapping to other languages looks rather awkward for string types”

MixedComment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

“Dafny gives you better tools to avoid this.”

RecommendsComment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

“The language is well designed for this.”

MixedComment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

“The semantics of Dafny is carefully designed to make verification efficient.”

RecommendsComment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

“This allows an algorithm to be formally verified while still producing executable code.”

MixedComment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

“in Dafny one can express much more complicated and complex invariants which get checked at build time”

RecommendsComment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

“Reminds me of Eiffel, in a good way. Looks awesome.”

RecommendsComment from 17 Dec 2025 in “Dafny: Verification-Aware Programming Language”

“Dafny fits that bill quite well, it's simple, it offers refinement types”

RecommendsComment from 16 Dec 2025 in “AI will make formal verification go mainstream”

“I'd like to call out the work from Nada Amin in this area”

RecommendsComment from 13 Dec 2025 in “50 years of proof assistants”

“Dafny is really simple. The barrier of entry is low.”

RecommendsComment from 27 Nov 2025 in “Coq: The World's Best Macro Assembler? (2013) [pdf]”

“Leftpad proofs using Rust Creusot, Dafny, or LiquidHaskell are quite straightforward”

RecommendsComment from 3 Nov 2025 in “Why don't you use dependent types?”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.