3 ms·
Raw shared mutability is a mine field the moment mutations that depend on the current state occur. If incrementing doesn't always increment you are in for a ba
by Guvante 5y ago
Raw shared mutability is a mine field the moment mutations that depend on the current state occur.
If incrementing doesn't always increment you are in for a bad time after all.
You are always going to have data that is shared and changes. Any non trivial system will. Rust just discourages the naive "just point to the heap" method that tends to work until it doesn't.
- pjmlp 5y agoExcept Rust can only help when the heap being pointed to isn't shared across processes, possiblity written in multiple languages, e.g. NUMA shared memory.
- Guvante 5y agoIf you do a crazy enough thing it will break isn't material to my statement "naively accessing the heap as if that is thread safe is bad anyway".