|
|
|
|
|
by masklinn
4825 days ago
|
|
> Not really. If you use channels to communicate between goroutines, then the concurrency model is that of sequential processes Except since Go has support for neither immutable structures not unique pointers, the objects passed through the channel can be mutable and keep being used by the sender. Go will not help you avoid this. > That is, the default concurrency model militated by Go is not shared memory, but that of CSP. It's disingenuous to affix Go with the same kind of concurrency model used in C. It's not, go passes mutable objects over its channel and all routines share memory, you get the exact same model by using queues in C. > What's your point? Purity for purity's sake? That the Go team has no issue breaking the rules they impose on others, so that point is irrelevant. |
|
Channels are pass-by-value. If you pass a struct, it's copied, and both sides can mutate their own copies as much as they want.
You can get still bugs if you make channels of pointers (or have pointers in your message structs etc).