3 ms·
Goroutines are not the same thing as Go channels.
by wahern 9y ago
Goroutines are not the same thing as Go channels.
- eropple 9y agoSorry, yes. Fibers (Go didn't invent them) also aren't directly equivalent because they don't allow explicit yields and composition.
- wahern 9y agoFibers don't, but goroutines + channels + closures do. They permit composition using the same call/return syntax and semantics as normal function calls. Futures and promises don't. Async/await is closer, but only by creating a second class of function incompatible with normal functions.
- deleted 9y ago[deleted]