News for hackers. Stuff that matters.
Re:How Our Rust-to-Zig Rewrite Is Going by duped on Thursday July 16, 2026 @06:32PM (#48941158)
I feel like this perpetuates a bad mental model. Unsafe is not an escape hatch. Code within unsafe blocks must uphold the same semantics as code outside it but the compiler cannot guarantee that those semantics are upheld.

If we're using analogies, `unsafe` is like a "hard hat required" sign. There's nothing intrinsically different about the space inside or outside of it, other than that you can't be sure a brick isn't going to fall on your head once you cross over. So it's on you to wear a hard hat. And to not drop any bricks and trust other people to do their best not to drop any bricks.

You wouldn't call that an escape hatch.

Re:How Our Rust-to-Zig Rewrite Is Going by silon42 on Friday July 17, 2026 @01:48AM (#48943728)
It can be abused as an escape hatch, but it really shouldn't be.
Re:How Our Rust-to-Zig Rewrite Is Going by tialaramex on Friday July 17, 2026 @03:42AM (#48944401)
Yeah, I'd have more sympathy for the "It's an escape hatch" model of this feature if the C++ approaches to this problem didn't keep adding actual escape hatches and waving away concerns as "Rust does this too so it's fine".