logoalt Hacker News

csande17 • today at 12:11 PM • 4 replies • view on HN

Yes. When people describe Rust as "a memory-safe programming language" they are describing an aspirational vision, and not a programming language that has actually been designed with sufficient rigor to guarantee memory safety. Any failure of rustc to actually guarantee this is just a bug in rustc itself, a failure to properly implement the Rust spec, because the closest thing Rust has to a spec is literally just the vague ideal that the compiler should guarantee safety somehow.

Rust cannot fail, it can only be failed.


Replies

DriverDaily • today at 12:49 PM

> Rust cannot fail, it can only be failed.

“Please build the perfect system. Because I specified ‘perfect’ any flaws are due to your incomplete implementation, not my awful brief.”

If the person writing the rust spec was a client I would have to drop them because they would be setting themselves up for dissatisfaction.

insanitybit • today at 12:33 PM

I don't think the definition of "memory safe" has ever required full end to end stack conformance with a proof. Very few languages have achieved that, though some have. Most people call Java memory safe, C#, Python, Typescript, etc - all of those fall short of a formally verified, sound type system with a verified toolchain.

➕ show 1 reply
UncleMeat • today at 12:29 PM

Would you say the same thing about Java? It’s type system is also unsound.

➕ show 2 replies
lolakutty • today at 12:21 PM

>Rust cannot fail, it can only be failed...

Sweet. But why should anyone care..