Re:I am not yet ready to switch to Zig from Rust
by cletus on Friday June 14, 2024 @12:39PM
(#40682321)
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.
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.