A study of real world data races in Golang Posted by pramodbiligiri on Tuesday April 05, 2022 @08:42AM from the arxiv.org dept. https://arxiv.org/abs/2204.00764 ( 1 comment | on HN )
I'm trying to reproduce that in this play: https://go.dev/play/p/3wkkfN3bMfH
Based on the study, I expect that the final print would print `err final value err:bar, 2`, but it's `<nil>`. And it is because it uses the shorthand variable declaration, which will make it to be in the scope of the go function closure.
Am I missing something?