Re:Why I rewrote my Rust keyboard firmware in Zig: consisten...
by pron on Monday March 08, 2021 @02:41PM
(#26390511)
I would put it differently. Rust sacrifices anything -- including things that may hurt other aspects of correctness -- to soundly guarantee (assuming the compiler is correct) no undefined behaviour in its safe subset (and yet makes some concessions, as a large percentage of Rust programs do employ unsafe code, and so don't make such a strong guarantee), while Zig finds a different balance, at times sacrificing possible UB for the sake of helping with functional correctness. Even if you look at correctness only, it is unclear which approach, if any, offers a better story.
So I think it's a fair statement. Rust is safety obsessed. Zig is doing its best while paying top tribute to other gods.