HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dafny-lang
dafny
C#2016–2024
dafny-lang / dafny

dafny

Dafny is a verification-aware programming language

28Distinct people
35Mentions
1Explicit recommenders
3.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Dafny is a verification-aware programming language

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

If you're interested in playing around with loop invariants for non-trivial programs, I recommend the Dafny programming language which can automatically verify the invariants…

wsxcde used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

  • zetzit/zz · linked in 3 of the same discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 3:59:04 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year35 dated mentions

Observed mentions: 2016-06-18 22:01:24 UTC to 2024-07-05 17:22:19 UTC.

02462016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC431
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC413
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC211
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC413
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC413
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC404
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC606
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC404
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC312

What Hacker News says

6 sources
> Ada has made real strides back from the dead, especially if you can stick to SPARK Ada. We're even seeing more formal verification of complex bits of software in systems-land, something that seemed basically impossible when I first read about Coq twenty something years ago. I really agree with this. The situation is a bit crazy. Since formal proofs are hard, the alternative taken is giving no guarantees at all. That's bad. Static analyzers can get really far. Contracts, even just at runtime are really useful. I don't want a piece of code to run if the precondition is not met, and I don't want it to return or have side effects if the postcondition is not met. This would rule out a massive class of errors. Of course, bonus points if you can do it at compile time. Ada SPARK, Infer [1] and Dafny [2] show that rigorous engineering is possibl
Read the rest
e and practical. Actually, Facebook (Meta now) argues Infer let's them move faster. I think the problem is political and economical. It's hard to monetize this first. I wish someone like Apple took the plunge and rebuilt a simpler version of their stack using formal verification. It's the kind of thing only a large corporation or a government can do because it might take half a decade to take off. Once it takes off its unstoppable. Who would not like to buy e.g. a phone where most bugs and security breaches are impossible by construction? Verification also has a nice side effect. Change for the sake of change and featuritis are pretty incompatible with it. [1] https://fbinfer.com [2] https://github.com/dafny-lang/dafny
In Programming breakthroughs we need
I agree with the Objective-S goals [1], and it is cool to see research in this direction. Are the mechanisms for defining architectural styles and some predefined styles (OO call/return, pipes & filters, REST and event broadcast) all that is new from Objective-S? Any other future goals? These seem relatively easy to implement as e.g. Lisp macros? Clojure supports many of these. Personally, I would like to see more research in program semantics. I think languages should try to reduce expressiveness whenever possible by offering mechanisms to do so, i.e. DSLs and DSL tools. Along with the total lack of popularity of design-by-contract / Hoare logic / refinement types, I think this is the biggest mistake in modern language design. In other fields, engineers strive to use components and to combine them in ways that yield artifacts with provab
Read the rest
le properties. An elementary example of this are truss structures in mechanical engineering. There is not that much research direction in this area. Personally, I like Dafny [2]. There is quite a lot of research on advanced type systems and theorem proving, but I think there is still a big gap in usability and automation. I think DSLs to restrict semantics + automated program analyses could be an excellent alternative. Infer [3] is pretty nice. Similar approaches that targeted a language with better semantics would be able to offer a lot more guarantees. [1] http://objective.st/About [2] https://github.com/dafny-lang/dafny [3] https://fbinfer.com
In Objective-S: architecture-oriented language based on Smalltalk and Objective-C
It is still alive, it has just moved to github! It is a big language and it can prove useful programs. Apparently, part of the Ethereum 2 specification was verified using it. https://github.com/dafny-lang/dafny I have been learning it and the syntax is close to most C style programming languages. As a software developer this makes it much more approachable than Coq. The proof statements also feel more like the math I learned in college rather than the weird magic keywords of Coq.
In Make formal verification and provably correct software practical and mainstream
You're right that you can't define a safe subset of C without making it impractical. MISRA C defines a C subset intended to help avoid C's footguns, but it still isn't actually a safe language. There are alternative approaches though: 1. Compile a safe language to C (whether a new language or an existing one) 2. Formal analysis of C, or of some practical subset of C, to prove the absence of undefined behaviour Work has been done on both approaches. ZZ compiles to C. [0] Dafny can compile to C++, but it seems that's not its primary target. [1][2] There are several projects on formal analysis of C. [3][4][5][6] [0] https://github.com/zetzit/zz [1] https://github.com/dafny-lang/dafny [2] https://dafny-lang.github.io/dafny/ [3] https://frama-c.com/ [4] https://www.microsoft.com/en-us/research/project/vcc-a-verif... [5] https://www.eschertech.
Read the rest
In ISO C became unusable for operating systems development

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.