3 ms·
Unrelated but also in the category of bugs Rust won't catch (natively), there are crates that allow C++ style contracts, or more generally, dependent typing and
by satvikpendem 6mo ago
Unrelated but also in the category of bugs Rust won't catch (natively), there are crates that allow C++ style contracts, or more generally, dependent typing and can be used to catch issues at compile time rather than runtime. I use this one, anodized.
https://docs.rs/anodized/latest/anodized/ https://docs.rs/anodized/latest/anodized/
- ozgrakkurt 6mo agoWhat do you think about the mental load and ergonomics this brings into the code? Also compilation time increase?
- satvikpendem 6mo agoThere is some compile time increase but it brings a lot more guarantees to the code. There was a recent post by a Rust maintainer that he wanted to bring Rust closer to a theorem prover so that as many things as possible can be caught during compile time over time time which might be more disastrous.