3 ms·
> First, I think Zig’s strength lies strictly in the realm of writing “perfect” systems software. It is a relatively thin slice of the market, but it is importa
by haberman 4y ago
> First, I think Zig’s strength lies strictly in the realm of writing “perfect” systems software. It is a relatively thin slice of the market, but it is important.
This resonates with me. This is exactly why I use C today, and why Zig appeals to me.
- mustache_kimono 4y agoThis definition of "perfect" might be counterintuitive for those that haven't read the piece. The idea is there might some ideal memory allocation scenario that Rust doesn't do "perfectly" that you can theoretically do better in Zig, which I buy. Most particularly, my experience with arenas and defer drop is -- they aren't always perfectly easy in Rust. But this definition of perfection tends to ignore all the manual, boilerplate memory management you have to do in the interim, that you may still mess up in some subtle way.
- haberman 4y ago> Most particularly, my experience with arenas and defer drop is -- they aren't always perfectly easy in Rust. That is my experience also: https://blog.reverberate.org/2021/12/19/arenas-and-rust.html https://blog.reverberate.org/2021/12/19/arenas-and-rust.html I was hoping the borrow checker would perfectly check arena lifetimes. And it does, but it requires that your types have lifetime parameters. That makes logical sense, but my experience attempting to actually use a type with a lifetime parameter is that it is so painful as to not be practical in a low-level library.
- mustache_kimono 4y ago"Why is Rust’s 'Bump' not' Sync'?" was exactly the issue I was thinking of. Thanks for writing this. Seriously, a must read!