3 ms·
I took a brief look at Zig. The top slogan for Rust is "fearless concurrency", which ties back into the memory model, mutability and sharing references. This
by ansible 8y ago
I took a brief look at Zig.
The top slogan for Rust is "fearless concurrency", which ties back into the memory model, mutability and sharing references. This helps you prevent (at compile-time) data races and other interesting bugs.
I didn't see any support for that in Zig at all.
- jungler 8y agoLast I checked Zig is more concerned about overflow conditions than Rust(numeric overflow, stack overflow, OOM etc.) and boasts features in that vein - so it competes, but not in the same territory. If you are writing a kernel it's highly likely that you'll end up in a lot of scenarios where you have to use unsafe Rust, in which case Zig would be the better language for the task. Admittedly, it would be nice to have some of both, and they both have room to get better. But I see Rust as more of a "libraries and applications" centric setup, where it's the right thing for a web browser and the wrong thing for a device driver.