Understanding real-world concurrency bugs in Go
blog.acolyer.org
blog.acolyer.org
Part of the problem was heavy use of inheritance and templates at a time of peak design pattern mania, part was just the nature of C++ and finally a dash of leaky abstractions because “low level async is hard”.
I guess based on experiences with ACE/TAO in C++, Python twisted and a couple of other frameworks that tried to “bolt on” deep server stuff:
I would take the language primitives not sucking over generics any day of the week.
It's not an either-or situation though: Rust has generics (and is a bit lower level), which has allowed go-style channels to be implemented as a library:
https://docs.rs/crossbeam-channel/0.3.8/crossbeam_channel/ https://twitter.com/stjepang/status/1006202765499125760
This is a good summary the state of developing anything Golang
How does Go's message passing compare to an implementation in C/C++ using shared memory? What about using a modern async/await framework, like in Javascript or C#? What about using Software Transactional Memory? None of these questions are answered.
> Contrary to the common belief that message passing is less error-prone, more blocking bugs in our studied Go applications are caused by wrong message passing than by wrong shared memory protection.
I don’t think anyone has argued that in Go you’ll have less message passing bugs than shared memory, especially considering that Go makes it really easy to use these constructs, so they get used more. My understanding of the argument is that these arguments are made in relation to other mainstream languages. This conclusion is relatively meaningless to me and I’m not sure how to interpret it.