this post was submitted on 08 Feb 2025
373 points (98.2% liked)

Open Source

32747 readers
150 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] barsoap@lemm.ee 1 points 1 day ago* (last edited 1 day ago) (1 children)

Rust has affine types and gets close to linear when you include #[must_use] (you can still let _ = foo but at least it won't be an accident, also, drop code isn't guaranteed to run and there's good reasons for that), refinement types there's a library for that. GADTs... I mean sure trait magic can get annoying and coming from Haskell you'd want to do more in the type system but in the end the idiomatic rust way to do many of those things is with macros. Which, unlike Haskell, Rust actually is really good at. Really good. Tack refinement types onto the language kind of good.

Proving tools, honestly, there's only one piece of actually proven software (SeL4) and the only language it's really written in is Coq. Which Rust will never, ever, compete with on its home turf.

[–] toastal@lemmy.ml 1 points 1 day ago
  • Can’t do it
  • Requires library, not built-in
  • Can’t do it
  • Can’t do it

Not sure why Haskell is being invoked—several languages have GADTs & macros.