News for hackers. Stuff that matters.
Re:How Our Rust-to-Zig Rewrite Is Going by AlotOfReading on Thursday July 16, 2026 @01:04PM (#48937180)
"Safe" has a very specific definition in Rust. It's not identical to the broader definition used in technical English. You can easily have safe rust code with behaviors any reasonable layperson would call unsafe, like crashing a plane. The original article, comment, and replies were using the word in the Rust sense from my reading, not the English meaning.
Re:How Our Rust-to-Zig Rewrite Is Going by inigyou on Thursday July 16, 2026 @01:32PM (#48937588)
Then that's equivocation. Why do we want a very specific form of safety instead of wanting safety in general?
Re:How Our Rust-to-Zig Rewrite Is Going by steveklabnik on Thursday July 16, 2026 @01:40PM (#48937689)
Memory safety is:

1. Foundational for other forms of safety

2. Has an objective definition, when some other forms of safety are either subjective or inter-subjective.

That said, I don't understand why your parent brought this up to you, you are talking about memory safety in your original comment here, so that's what Rust's safety is about.

Re:How Our Rust-to-Zig Rewrite Is Going by inigyou on Thursday July 16, 2026 @03:14PM (#48938933)
I feel that the buzz phrase "memory safety" has been defined by Rust to mean "the safety Rust gives you". Obviously memory usage can be more safe or less safe, and Rust is decidedly on the safe end of the spectrum, but it also has the gaping type system holes demonstrated in cve-rs which completely shatter any claim that safe code is safe, and there are other bugs which occur in Rust while the programmer is distracted by trying to prove their code is memory-safe.
Re:How Our Rust-to-Zig Rewrite Is Going by steveklabnik on Thursday July 16, 2026 @03:17PM (#48938973)
> the buzz phrase "memory safety" has been defined by Rust to mean "the safety Rust gives you".

It's more that Rust's safety guarantee is memory safety. No more, no less. It's not about buzz, this term was used long before Rust existed.

> it also has the gaping type system holes demonstrated in cve-rs

This is not a "gaping hole". It is a compiler bug, which has never been found in the wild.

> there are other bugs which occur in Rust

This is true! Every language can have bugs in it, and Rust does not claim to solve all bugs.

Re:How Our Rust-to-Zig Rewrite Is Going by inigyou on Thursday July 16, 2026 @03:28PM (#48939133)
Does cve-rs break any type system rules? If so, why hasn't it been fixed yet?
Re:How Our Rust-to-Zig Rewrite Is Going by steveklabnik on Thursday July 16, 2026 @03:35PM (#48939194)
> Does cve-rs break any type system rules?

Yes.

> If so, why hasn't it been fixed yet?

Pretty classic software engineering reasons.

The part of the system that it involves was in the process of being re-written already. The re-write fixes the bug. Because it is essentially a theoretical issue, and not an actual problem in any real code, it is not a five alarm fire. Waiting for that re-write to land makes the most sense, instead of putting in a ton of work that will be thrown away.

Other, more serious miscompilations get fixed faster. In fact, a version of the Rust compiler was released today to fix one, even https://blog.rust-lang.org/2026/07/16/Rust-1.97.1/

This one was impacting actual users, and did not require re-writing entire subsystems to fix properly. So the engineering and product tradeoffs are different.

Re:How Our Rust-to-Zig Rewrite Is Going by inigyou on Thursday July 16, 2026 @04:27PM (#48939777)
If cve-rs exists, is safe rust safe? Can one prove that Rust code is safe only by auditing the unsafe blocks?
Re:How Our Rust-to-Zig Rewrite Is Going by steveklabnik on Thursday July 16, 2026 @04:48PM (#48940014)
Every compiler has bugs.
Re:How Our Rust-to-Zig Rewrite Is Going by inigyou on Friday July 17, 2026 @05:42AM (#48945239)
Not what I asked
Re:How Our Rust-to-Zig Rewrite Is Going by whytevuhuni on Friday July 17, 2026 @03:04PM (#48951076)
If cve-rs exists, we still say that safe Rust is safe, in the same way that we say Python is safe despite potential bugs in its interpreter or native libraries, and that Java is safe despite potential bugs in the JVM or JNI libraries, and so on.
Re:How Our Rust-to-Zig Rewrite Is Going by nvme0n1p1 on Thursday July 16, 2026 @01:46PM (#48937777)
> safety in general

This is impossible. General words like "safe" and "good" are subjective, and useless in a technical context unless you ground the discussion by giving them specific definitions. Otherwise everyone ends up talking past each other.

Re:How Our Rust-to-Zig Rewrite Is Going by inigyou on Thursday July 16, 2026 @02:27PM (#48938282)
Okay, thanks for debunking all good products, safe houses and clean water. I guess they are just products, houses, and water.
Re:How Our Rust-to-Zig Rewrite Is Going by nvme0n1p1 on Thursday July 16, 2026 @03:26PM (#48939101)
Good for what? A hammer is good for driving a nail, but not good for driving a screw.

Safe for what? My house is safe for humans, but not safe for tropical birds.

Clean enough for what? Our water is clean enough to wash my ass, but not clean enough to wash a telescope mirror.

Sorry but life is not a Disney movie where some things are unequivocally good/safe and other things are unequivocally bad/unsafe. There are gradients and conditions, and communication requires a shared language between participating parties to navigate them.

Re:How Our Rust-to-Zig Rewrite Is Going by inigyou on Thursday July 16, 2026 @05:33PM (#48940549)
What nail? A hammer is good for driving a nail from the hardware store, but not good for driving a finger nail.

See? I can play stupid word games too.

How tropical are the birds? I'm afraid life isn't a Disney movie where some things are unequivocally tropical/not tropical. How shared is the language? Congratulations on using only two adjectives in your comment besides the ones you're complaining about, but two is greater than zero.

How much your is the house? Do you own it? Without any mortgage or lien?

Re:How Our Rust-to-Zig Rewrite Is Going by nvme0n1p1 on Thursday July 16, 2026 @09:05PM (#48942262)
You're just doing the same thing and further proving my point. Thanks, I guess?
Re:How Our Rust-to-Zig Rewrite Is Going by skissane on Thursday July 16, 2026 @01:41PM (#48937711)
> Why do we want a very specific form of safety instead of wanting safety in general?

Because a “very specific form of safety” is a useful tool in achieving “safety in general”

Because a “very specific form of safety” is tractable for a compiler and language runtime to achieve, “safety in general” isn’t