News for hackers. Stuff that matters.
Re:Things you can’t do in Rust (and what to do instead) by andrewaylett on Monday May 17, 2021 @07:42AM (#27182362)
OK, I'll grant I should have added scare quotes to "impossible".

A quick check suggests that (as would be expected) they're caused by `unsafe` blocks. Specifically, by the developer claiming that a value was safe to send to a different thread while it actually wasn't. One thing to note is that these bugs neutralised the compiler's validation is these specific cases -- allowing, rather than causing, races. Using unsafe means the developer needs to ensure they maintain the invariants themselves within the unsafe block, while in C++ one has to maintain these invariants in _all_ code.

There are no comments on this comment yet.