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

Rust pro tip: use type alias. As for using lock() - you'd have to do it in any language in some way. If you have sharing and mutability, you need some kind of synchronization.


Only in Rust you need synchronization when accessing an object from multiple places on the same thread.


You don’t need full synchronization if you’re not going cross threads. RefCell and the like don’t use atomic operations or barriers or anything fancy like that.




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

Search: