dafny VS Idris2

Compare dafny vs Idris2 and see what are their differences.

dafny

Dafny is a verification-aware programming language (by dafny-lang)

Idris2

A purely functional programming language with first class types (by idris-lang)
ReSharper is now available in VS Code and Cursor
ReSharper brings a professional toolset for C# developers backed by over 20 years of experience, enterprise-grade security, SOC 2 compliance, and the trust of companies worldwide.
www.jetbrains.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
dafny Idris2
43 41
3,431 2,975
1.1% 1.7%
8.3 9.0
4 days ago 3 days ago
C# Idris
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

dafny

Posts with mentions or reviews of dafny. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2026-05-20.
  • There's Never Been a Better Time to Study Computer Science
    1 project | news.ycombinator.com | 25 May 2026
  • Learnings from 100K lines of Rust with AI (2025)
    2 projects | news.ycombinator.com | 20 May 2026
    It's a set of asserts that are a part of the type signature. Requires are asserts on the inputs, ensures are asserts on the outputs.

    Depending on your backend you either ignore them, check them all of the time, some of the time, or have SMT-solvers prove that if you uphold the first one all else must follow.

    If you're interested in the last one, have a look at Dafny[0]

    [0] https://dafny.org/

  • Vera: a programming language designed for machines to write
    5 projects | news.ycombinator.com | 29 Apr 2026
    > The signature declares types, preconditions, postconditions, and effects. The compiler verifies the contract via SMT solver.

    This reminds me of Dafny: https://dafny.org/

    Actually, that would be an interesting question: how good are LLMs at writing (correct) Dafny?

  • Dafny: Verification-Aware Programming Language
    1 project | news.ycombinator.com | 16 Dec 2025
  • Verified Ordered Set in Dafny
    1 project | dev.to | 14 Aug 2025
    In the world of software development, we spend countless hours writing tests to prevent bugs. But what if we could prove, with mathematical certainty, that our code is free of entire classes of errors? This is the promise of formal verification, and tools like Dafny are making it more accessible than ever.
  • Long division verified via Hoare logic
    1 project | news.ycombinator.com | 26 Feb 2025
    Automation of Hoare logic is quite good these days. Dafny, from MS Research (https://dafny.org), is probably the most friendly formal language. Dafny has been used to verify large systems, including many components of AWS. I am hoping that LLMs make more advanced languages, such as Liquid Haskell or Agda, much easier to write. Ideally, lots of code should be autocompleted once a human provides a type signature. The advantage of formal verification is that we are sure the generated code is correct.
  • Automated reasoning and generative AI: Harness creativity with formal verifications
    2 projects | dev.to | 28 Jan 2025
    Modern software verification employs various approaches, each offering different trade-offs between ease of use and strength of guarantees. AWS contributes to the open source program verification tools used in the previous examples. Dafny and Kani represent two powerful approaches to program verification. Let's see how they work in practice before connecting the dots between automated reasoning and generative AI.
  • Playing Chess with 84,688 Regular Expressions
    6 projects | news.ycombinator.com | 6 Jan 2025
    On that note, I discovered Dafny[1] recently, as a more accessible way to program with proofs. There's a companion book[2] that seems very accessible and down-to-earth (and, unfortunately, quite expensive). I didn't have the time to play with it yet, but it looks like it does what Ada/SPARK does (and more), but with less verbose syntax and more options for compilation targets. It seems to be actively developed, too. Personally, I had a very hard time getting into Coq, which is a proof assistant more than a programming environment - Dafny seems much more welcoming for a "working programmer" :)

    [1] https://dafny.org/

    [2] https://mitpress.mit.edu/9780262546232/program-proofs

  • F*: A proof oriented general purpose programming language
    5 projects | news.ycombinator.com | 25 Dec 2024
    https://dafny.org/ also allows proof checking and allows do write real programs with it. It has a java like syntax and is also from MS I believe
  • Safer with Google: Advancing Memory Safety
    2 projects | news.ycombinator.com | 16 Oct 2024
    > I do think there's a bit of the Ignaz Semmelweis[1] issue at hand here, where developers want to believe in their inherent quality and refuse processes that improve safety if it goes against their worldview

    I think the problem is that other variables (not only safety) must be assessed beyond the pure "better". Haskell is very good also. Very correct. Who uses that, and where? And why? Why not everyone uses https://dafny.org/ ?

Idris2

Posts with mentions or reviews of Idris2. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-11-23.
  • Racket v9.0
    6 projects | news.ycombinator.com | 23 Nov 2025
    it's bootstrapped off of GHC.

    (i created a PR to refactor their build system to reify the bootstrap process all the way down from GHC. it basically generalized the normal build workflow of Idris2 to be able to animate the entire bootstrap chain from GHC. sadly, it was pretty much ignored, and later abandoned: https://github.com/idris-lang/Idris2/pull/1990)

  • De Bruijn notation, and why it's useful
    4 projects | news.ycombinator.com | 30 May 2025
    Idris[1] and most of the dependent typed languages that I've looked at use de Bruijn numbers. (As does my own[2].)

    The Idris implementation also has a list of names in scope as an argument to the type of a Term, which makes the compiler (also Idris) check if you're making a mistake with your de Bruijn indices. (I did not do this in mine, but I should have.)

    [1]: https://github.com/idris-lang/Idris2

  • Idris2: A purely functional programming language with first class types
    1 project | news.ycombinator.com | 6 Nov 2023
  • Lean4 helped Terence Tao discover a small bug in his recent paper
    10 projects | news.ycombinator.com | 27 Oct 2023
    Have you looked into Idris2 at all. While looking into these theorum provers, it always felt like they had an impedance mismatch with normal programming.

    Idris2 portends to a general purpose language that also has a more advanced type system for the theorum proving.

    https://github.com/idris-lang/Idris2

  • How to Keep Lambda Calculus Simple
    1 project | news.ycombinator.com | 8 Jul 2023
    The original paper also does plain STLC first in section 2, and then adds dependent types in section 3. (And finally it adds the naturals in section 4.)

    In the Idris2 github repository, Guillaume Allais goes a step further and shows a well-named version. There the types of terms and values are indexed by the list of names in the environment and the compiler checks that the manipulation of deBruin levels and indices is correct:

    https://github.com/idris-lang/Idris2/blob/main/libs/papers/L...

  • What are the current hot topics in type theory and static analysis?
    15 projects | /r/ProgrammingLanguages | 8 May 2023
    Most of the proof assistants out there: Lean, Coq, Dafny, Isabelle, F*, Idris 2, and Agda. And the main concepts are dependent types, Homotopy Type Theory AKA HoTT, and Category Theory. Warning: HoTT and Category Theory are really dense, you're going to really need to research them.
  • New video! 2022 in Programming Languages
    8 projects | /r/contextfree | 28 Jan 2023
  • How to avoid right intendation?
    2 projects | /r/haskell | 17 Jan 2023
    Idris2 has a great syntax for this, see e.g. node018:
  • Data types with Negation
    2 projects | /r/ProgrammingLanguages | 16 Jan 2023
    I asked because it just baffles me any time I see a dependently typed language using unary numbers. I think to myself, "are these people even educated? Do they know about number systems?" I mean, cavemen were the last group using unary number system as their mainstay, and that was during the Paleolithic. Then they have issues open like this when they discuss optimizing those damn unaries. But this shouldn't even have been a problem for anyone even remotely related to programming! It's giving a terrible impression of dependently-typed languages. Getting rid of those should be the first step of popularizing them.
  • I've learned this from Conor McBride on an SPLV'19 bus ride. A literary reference would be welcome.
    1 project | /r/programmingcirclejerk | 12 Jan 2023

What are some alternatives?

When comparing dafny and Idris2 you can also consider the following projects:

tlaplus - TLC is a model checker for specifications written in TLA+. The TLA+Toolbox is an IDE for TLA+.

lean4 - Lean 4 programming language and theorem prover

FStar - A Proof-oriented Programming Language

purescript - A strongly-typed language that compiles to JavaScript

koka - Koka language compiler and interpreter

smalltt - Demo for high-performance type theory elaboration

ReSharper is now available in VS Code and Cursor
ReSharper brings a professional toolset for C# developers backed by over 20 years of experience, enterprise-grade security, SOC 2 compliance, and the trust of companies worldwide.
www.jetbrains.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured

Did you know that C# is
the 11th most popular programming language
based on number of references?