Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That looks incredibly useful. Proving the absence of panics and overflows is already great, and with the annotations you can guarantee properties you'd normally write property tests for, like in this example from the docs:

  impl List {
      #[ensures(self.len() == old(self.len()) + 1)]
      pub fn push(&mut self, elem: i32) {
          // TODO
      }
  }


Can't wait for dependently typed type systems


I've written code with dependently typed languages. It's very powerful, but it really is time-consuming. That won't be appropriate for all developments/developers.


Do you recommend any of the dependently typed languages more over others?


My experience is stale by now. I'd really like to try recent versions of Idris, though.


No need to wait, you can pick Idris today, but it won't be a productive experience versus mainstream development tooling.


This really reminds me of design by contract, which I find absolutely fascinating.

Another library that implements this, albeit at runtime (and optionally using MIRAI is https://docs.rs/contracts/latest/contracts/




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: