Hacker News new | ask | show | jobs
by vore 950 days ago
Kind of ironic the raison d'être of Go is a memory safe language for concurrent programming but you can easily footgun yourself into doing something memory unsafe using concurrency...
1 comments

Go generaly doesn't used shared memory and concurrency, or at least it's been considered an anti-pattern: https://go.dev/blog/codelab-share
That is dishonest.

Implicitly shared memory is literally the default behaviour of the langage, and you have to be careful to keep that controlled or contained.

Pretty much as in every other shared memory concurrency langage.

The quip about sharing memory by communicating is cute but it’s just that, the langage does not encourage let alone enforce it.

In fact it went out of its way to remove some opportunities e.g. because `go` is a statement there is no handle which could communicate the termination and result of routines.

Yes, but at the same time shared memory concurrency is not considered an unsafe usage of Go either...