TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What would it take to add refinement types to Rust?

26 pointsby leosarev5 months ago

3 comments

conradludgate5 months ago
For what it&#x27;s worth, with the uom[0] crate you can represent that type equality. It represents units as powers of SI units, so m^1s^-2. It does not have the nice error messages though<p>[0] <a href="https:&#x2F;&#x2F;docs.rs&#x2F;uom&#x2F;latest&#x2F;uom&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.rs&#x2F;uom&#x2F;latest&#x2F;uom&#x2F;</a>
deterministic5 months ago
Having refinement types in Rust would be a massive game changer. It would make it possible to write proven correct software directly in Rust. Hey even I would switch from C++ to Rust :)
fn-mote5 months ago
Author has made significant contributions to Rust. This is a very serious article.