4 ms·
There was a discussion yesterday in which the blog author stated (and elaborated on) "I strongly disagree that Zig is safer than — even — unsafe Rust. Anyone te
by Rendello 2y ago
There was a discussion yesterday in which the blog author stated (and elaborated on) "I strongly disagree that Zig is safer than — even — unsafe Rust. Anyone telling you otherwise is either purposefully lying, or ignorant". That has been my experience as well. The sorts of errors I ran into were the same as in my C and HolyC experience, and not the sorts of errors I get with Rust.
- Rendello 2y agoI meant to link it earlier: https://news.ycombinator.com/item?id=42942618 https://news.ycombinator.com/item?id=42942618
- throw-the-towel 2y agoWait, how come you even have HolyC experience?
- Rendello 2y agoFor a few years I was a highly-paid TempleOS sysadmin for a fortune 500 company. Just kidding ;) It was hobby development, of course. Building demos and games in HolyC was how I finally started learning lower-level software.
- cztomsik 2y agoRust is generally safer than Zig, but unsafe Rust is/was (mid)designed in such way that it's almost guaranteed to blow in your face eventually. I don't know if mutable noalias has been already enabled for good, but even if there are no changes between compiler versions, those mutable noalias rules are super-tricky to get right. In Zig, a pointer is just regular thing, you take care, but most pointers are arena-allocated anyway, and that's a bit like runtime-branded lifetime (which is great and Rust cannot do that, at least not in idiomatic Rust).