Re:Intro to images in Go – concurrency
by kibwen on Friday November 01, 2013 @09:03AM
(#6653350)
Shared mutable state is a very efficient means of sharing data among multiple tasks. Contrast Erlang, which (AFAIK) has to make a copy of whatever data is being shared, and copying is a relatively expensive operation.
The downside of shared mutable state is that it pushes the burden of correctness out of the language and onto the programmer. With Erlang's approach, data races are impossible. With Go's approach, you have to apply an optional static analysis (the built-in data race detector) to give you any assurance of correctness (and that's only a heuristic, not a guarantee of correctness).
The downside of shared mutable state is that it pushes the burden of correctness out of the language and onto the programmer. With Erlang's approach, data races are impossible. With Go's approach, you have to apply an optional static analysis (the built-in data race detector) to give you any assurance of correctness (and that's only a heuristic, not a guarantee of correctness).