3 ms·
The design of channels is constrained by the need to support concurrency. If you do not need concurrency, using something designed to support it will be subopti
by Mawr 3y ago
The design of channels is constrained by the need to support concurrency. If you do not need concurrency, using something designed to support it will be suboptimal. And because it's specifically concurrency, the overhead will be substantial.
... that's the theory behind it. For more grounded explanations, see [1] & [2].
[1] https://news.ycombinator.com/item?id=29510751 https://news.ycombinator.com/item?id=29510751
[2] https://ewencp.org/blog/golang-iterators/index.html https://ewencp.org/blog/golang-iterators/index.html
- konart 3y agoYeah, I kind forgot we don't have anything concurrency related here. Thanks for the links!