The concurrency and threading in Go just feels like magic compared to every other language. I'm a goroutine addict and I refuse to be rehabilitated.
Just from observations over the years, I don't think there's any other language quite like this, in terms of how things can end up happening in any thread.
It's also just as easy to incorrectly share memory and cause race conditions. There's no protection against it and it violates memory safety.
For sure. The parent comment was merely asking if it could be done without channels or mutex, not if it was a good idea or not. Of course sometimes it is indeed the right thing to do.
Wait groups do use concurency primitives underneath.
My point is that the primitives that go provides are too easy to use incorrectly. And the language makes it hard to build nice abstraction on top of them. So I generally steer people away from using them unless strictly necessary, channels in particular.
SamInTheShell · · focus · HN ↗
Just from observations over the years, I don't think there's any other language quite like this, in terms of how things can end up happening in any thread.
tym0 · · focus · HN ↗
Stick to err/wait group and go routines and it's OK. Any PR with a channel or mutex I'll assume the author made a mistake.
lolpython · · focus · HN ↗
osigurdson · · focus · HN ↗
treyd · · focus · HN ↗
osigurdson · · focus · HN ↗
osigurdson · · focus · HN ↗
tym0 · · focus · HN ↗