News for hackers. Stuff that matters.
Re:Why I rewrote my Rust keyboard firmware in Zig: consisten... by roca on Tuesday March 09, 2021 @07:56PM (#26406520)
As someone who cares about safety in my software I'm going to take Rust's proven benefits over Zig's unproven hopes.
Re:Why I rewrote my Rust keyboard firmware in Zig: consisten... by pron on Wednesday March 10, 2021 @03:14AM (#26409005)
Again, you misunderstand. Both Zig and Rust have much less UB than C. The delta between Rust and Zig comes at a cost to language simplicity and to more testing. You're guessing that that cost's negative impact on correctness is smaller than that positive delta. It's a reasonable guess, but so is the opposite one, and neither is more proven than the other, which would be my guess (while I don't write safety-critical code these days, I worked on safety-critical realtime software where a bug or even a later response could cost the lives of many people; in such correctness-critical domains C is preferred over C++ despite being less safe), although I would even more confidently bet that the real difference, whichever way, is small.