3 ms·
Besides the CTE and Cross compiling, what is objectively better in Zig then in Rust? Just the Rust ecosystem would sway me towards it honestly instead of someth
by rowanG077 4y ago
Besides the CTE and Cross compiling, what is objectively better in Zig then in Rust? Just the Rust ecosystem would sway me towards it honestly instead of something esotoric like Zig. Writing unsafe Rust is not really a problem I have.
- kuon 4y agoWell, I am not saying it is better objectively, but for my uses it was easier. I wrote a firmware in rust and I rewrote it in zig as my first real world exercice, I ended up with 90% less code. Rust has really great abstraction and I like it, but for some things it is overkill. In zig I didn't need much of the abstraction because I did not have to make the borrow checker happy. In rust you have to structure your code in a way each part of it will have access to what it needs. In zig you just access it, as a global if needed. And sometimes the ability that zig code have to fit in memory (mine) is a real productivity boost.