3 ms·
Cool! What's the Go memory model look like? Is it stricter than ARM or could possibly working programs be broken when run there?
by Locke1689 11y ago
Cool! What's the Go memory model look like? Is it stricter than ARM or could possibly working programs be broken when run there?
- 4ad 11y agohttps://golang.org/ref/mem https://golang.org/ref/mem Btw, in case it's not clear, Go has worked on ARM for the last 6 years, this is not a new thing. It is the job of the compiler and runtime writer to ensure this model on whatever target platform. It doesn't matter if the target platform has a strong or weak memory model. Correct Go programs written for the Go memory model should work correctly on any target. Of course that it's possible to write Go programs that violate the memory model but work on amd64, and not on some other platforms. But those are incorrect Go programs (and the race detector has a very good chance of detecting these problems). I will note that it's significantly harder to write these programs accidentally in Go though, than it is to write them in C.