3 ms·
“For comparison, last week we caught a significant race condition in another Kubernetes-related project we maintain called Helm (written in Go) that has been th
by melling 7y ago
“For comparison, last week we caught a significant race condition in another Kubernetes-related project we maintain called Helm (written in Go) that has been there for a year or more, and which passed the race checker for Go. That error would never have escaped the Rust compiler, preventing the bug from ever existing in the first place.”
I’ve heard people brag that Haskell is a great language because it’s supposedly easier to write correct code.
Rust has this same reputation?
- tybit 7y agoYes, though I believe Rust has already proven this more in practice than Haskell has. Rust has many advocates now at places like Mozilla, Amazon and Microsoft that have delivered critical software in Rust that they believe has made it safer.
- yongjik 7y agoI think the common saying is that once your Haskell code compiles, it's usually correct. The fine print is that nobody claimed it's easy to write Haskell code that compiles.
- sitkack 7y agohttps://youtu.be/DdR9q69se-I?t=1329 https://youtu.be/DdR9q69se-I?t=1329
- Falell 7y agoYes. The common blurb is: In safe rust the borrow checker encourages 'fearless concurrency' by statically preventing all data races.
- exdsq 7y agoIt’s harder to formally prove Rust code compared to Haskell, the company I work at prototyped in Rust and then used domain information gained to improve the parallel implementation in Haskell.
- lmm 7y agoYes, for much the same reasons. Pretty much any ML-family language has the same effect; just having proper sum types, polymorphism and first class functions (and not having null) goes a long way to preventing huge classes of bugs.
- nindalf 7y agoThe critical feature enabling fearless concurrrency is Rust's borrow checker though, something that the other ML languages don't have.
- lmm 7y agoIn practice you have fearless concurrency in every other ML language I know, because they're all immutable-first. It's true that if you wrote some code that mutated data then it wouldn't be concurrency-safe, but why would you do that?