by jvanderbot · 2y ago · 0 comments
I am not saying you're wrong, I just don't find it any better than C++ concurrent code, you just have many different lock types that correspond to the borrow-checker's expectations, vs C++'s primitives / lock types.
Channels are nicer, but that's doable easily in C++ and native to Go.
Which is quite good, but leaves out shared memory with other processes, or threads having data races with external resources, while corner cases they are quite common in distributed computing scenarios.
So its supremacy above anything else is kind of relative, and always left of out context.
Yes and yes...
Rust statically enforces that you don't have data races, i.e. it's not possible in Rust (without unsafe hacks) to forget to guard access to something with a mutex. In every other language this is enforced with code comments and programmer memory.
Although making a Rust monolith would be great!