3 ms·
What you're talking about here is disabling runtime assertions, which is a common practice in C/C++ (using #define macros). Runtime assertions are strictly infe
by cletus 2y ago
What you're talking about here is disabling runtime assertions, which is a common practice in C/C++ (using #define macros). Runtime assertions are strictly inferior to Rust's compile-time assertions because Rust allows you to do a subset of what you can do in C/C++ but it verifies that the memory ownership is correct without a runtime cost, unsafe code notwithstanding).
There simply is no way you could do that in C/C++ (and, by extension, Zig) because of the legacy support.
I'm fine with having multiple languages. One language to rule them all just tends to mean something is mediocre at everything.