Go is by default not thread safe. Here the author shows that by looping
for { globalVar = &Ptr { val: &myval } globalVar = &Int { val: 42 } }
So I guess go is easier to write, but not with the same level of safety
Go is by default not thread safe. Here the author shows that by looping
You can create a pointer with value 42 as the type and value are two different words and are not updated atomicallySo I guess go is easier to write, but not with the same level of safety