Re:Why is Rust difficult?
by smaddox on Tuesday January 23, 2018 @10:44AM
(#16214423)
Were you writing functions/procedures under the implicit assumption that they would be executed under a single threaded context? Because Rust does not allow this assumption without using "unsafe". I've run into this before, and it can be a bit irritating, but if there's even a small chance you'll later want to execute the code in a multithreaded context, it will more than pay for the inconvenience. And if you're sure you won't, then you can just throw the data into an UnsafeCell and call it a day.
[ Parent
| on HN ]
Re:Why is Rust difficult?
by steveklabnik on Tuesday January 23, 2018 @11:41AM
(#16214894)
It's not even inherently about multi-threading https://manishearth.github.io/blog/2015/05/17/the-problem-wi...