▲ | dwattttt 5 days ago | ||||||||||||||||||||||||||||||||||
If a language is "memory safe", by some definition we expect safety from memory faults (for example, not accessing memory incorrectly). If a language is "memory safe" but not "thread safe", is the result "the language is free from 'memory faults', unless threads are involved"? Or to put it another way; when used however the term of art is intended, "memory safety" is meant to provide some guarantees about not triggering certain erroneous conditions. "not thread safe" seems to mean that those same erroneous conditions can be triggered by threads, which seems to amount to '"memory safety" does not guarantee the absence of erroneous memory conditions'. | |||||||||||||||||||||||||||||||||||
▲ | pizlonator 5 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
> If a language is "memory safe" but not "thread safe", is the result "the language is free from 'memory faults', unless threads are involved"? Yes. If a language is memory safe but not thread safe, then you can race, but the outcome of those races won't be memory corruption or the violation of the language's type system. It will lead to weird stuff, however - just a different kind of weirdness than breaking out of the language's sandbox | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
▲ | dwattttt 5 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
I guess to also elaborate the point; it's also entirely correct to say "Rust is guaranteed to be memory safe unless 'unsafe' is involved". | |||||||||||||||||||||||||||||||||||
|