3 ms·
I have used both and its hard to argue that goroutines and channels are as easy to use as async/await.
by tiuPapa 8y ago
I have used both and its hard to argue that goroutines and channels are as easy to use as async/await.
- weberc2 8y agoOn the surface, perhaps, but when you factor in the gotchas of both approaches and the debugging difficulty, I much prefer goroutines. In particular, I’ve never witnessed someone DOS a fleet of servers in Go by scheduling a task was making a sync call under the covers, by doing an intensive computation in the event loop, or by scheduling tens of thousands of tiny events. We also have a lot of bugs involving accidentally putting the task/coroutine into a variable instead of the result of the task because the programmer forgot the “await” keyword, but that’s a dynamic typing problem.