Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If I were to port this to Rust, first, the borrow checker would catch the described bugs and not allow me to write them in the first place. But secondly, if I really insist on something global that I need to mutate or share between threads, I can do so, but would be explicitly required to choose a type (Mutex, RwLock, with Arc or something) so that a) I have thought about the problem and b) chose something that I know to work for my case.

Agreed. Not the specifics, as I don't know Rust, but it makes sense.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: