3 ms·
Rust only catches integer overflows in debug builds, my C# programs catch it everywhere. The compiler setting is off by default but it is available. In Rust, m
by Const-me 5y ago
Rust only catches integer overflows in debug builds, my C# programs catch it everywhere. The compiler setting is off by default but it is available.
In Rust, many libraries especially the standard one have lots of unsafe code, with a history of security bugs there [1]. In C#, the standard library is written in almost 100% safe code.
About threading, while it doesn't catch all data races automatically, C# implements many useful things on the VM level. Monitor class, or memory model guarantees, are very hard to implement in languages who compile to native code.
[1] https://shnatsel.medium.com/how-rusts-standard-library-was-vulnerable-for-years-and-nobody-noticed-aebf0503c3d6 https://shnatsel.medium.com/how-rusts-standard-library-was-v...