4 ms·
Well, 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 exerci
by kuon 4y ago
Well, 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.