Hacker News new | ask | show | jobs
by ninepoints 1854 days ago
You're missing the big idea a bit. Coroutines in C++ can be used to implement generators or goroutines or async/await, etc. They are intended for library authors as a lower level construct. See for example: https://www.jeremyong.com/cpp/2021/01/04/cpp20-coroutines-a-...
1 comments

I literally said this at the end of my comment about coroutines being a low-level primitive.
You raised two hypotheticals and said you honestly don't know if either/both/neither are true.

1. Is it like Python generators?

2. Is it a bad example of design by committee and meant as a set of lower level primitives?

GP responded that 2 is correct (but without the sass on design by committee) and that 2 allows for them to implement such things as 1.

I think they gave their opinion as to what parts of your hypotheticals are true, and that is a valuable contribution, and very much not the same as just repeating parts of your comment ("I literally said this").