Remix.run Logo
Calavar 5 days ago

By that definition Rust also counts as unsafe. Even managed languages like C# and Java would be unsafe.

gpm 5 days ago | parent | next [-]

There's a reason why rust devs qualify it as "memory safe" so frequently, we tend to agree that rust is, like virtually every current programming language, unsafe in other ways.

Memory safety is just the source of bugs that we've figured out how to eliminate. It's a significant source of really bad (hard to debug due to action at a distance, high impact, etc) bugs so that's worth a lot, but it's not perfect. And even then we have a more frequently used escape hatch to the memory-unsafe world than would be ideal from a safety perspective for practical reasons.

A more complete version of safety would be achieved with a language that proves code correct to arbitrary specifications. We aren't there yet for there being such a language that is practical for every day use. Personally I'm increasingly optimistic we'll get there sooner rather than later (say, within 20 years). Even then there will probably be specification level bugs that prevent a claim of complete safety...

kstrauser 5 days ago | parent | prev | next [-]

My impression of the Rust devs is that they’d agree with you about any easy-to-trigger calamities. So would Java contributors. C# might not because MS is institutionally not good about admitting mistakes, but I bet the individual devs would agree over a beer.

ackfoobar 5 days ago | parent | prev | next [-]

Do you have some examples? I think JDK developers make a lot of effort to make sure users bugs will not corrupt the runtime.

dcminter 5 days ago | parent | prev [-]

What kinds of breakage do you have in mind though? The number of times I've segfaulted the JVM is tiny.