4 ms·
I believe Rust had some form of contract enforcement in its early days, but they eventually removed it because it had too many problems. I wish I could find the
by TazeTSchnitzel 4y ago
I believe Rust had some form of contract enforcement in its early days, but they eventually removed it because it had too many problems. I wish I could find the post about it, but Google is useless these days.
- mihaigalos 4y agoThe contracts crate [1] supports this via macros. I actually prefer the invariant section above the definition, but do admit the pre and post in C++ look better. [1] https://docs.rs/contracts/latest/contracts/ https://docs.rs/contracts/latest/contracts/