> a subtle data race and a rare deadlock
That's a langage problem that humans face as well, which golang could stop having (see C++'s Thread Safety annotations).
Go has a pretty good race detector already, and all it (usually) takes to enable it is passing the -race flag to go build/test/run/etc.
No language protects from dead lock.
You should be using rust... mm kay :\
Go has a pretty good race detector already, and all it (usually) takes to enable it is passing the -race flag to go build/test/run/etc.