r/cpp • Game Developer | quiz.cpp-perf.com • Aug 10 '23

The downsides of C++ coroutines

https://reductor.dev/cpp/2023/08/10/the-downsides-of-coroutines.html
91 Upvotes

90 comments sorted by

View all comments

Show parent comments

8

u/germandiago Aug 10 '23

I will never understand why Chris Kholoff's more understandable, superior function-object model never made it in.

As for heap allocations, new can still be overloaded at least.

7

u/lee_howes Aug 10 '23

I don't recall Chris's design ever having an implementation, or any real detail about the way it would work. So it was easy to understand, but only in the sense that it didn't tell us a great deal. Apparently, it wasn't obviously superior either or more people would have argued for it.

5

u/germandiago Aug 11 '23

I recall there was some macro-based implementation but I am not sure which version of the proposal that was .

It did in fact, in prototype section: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4453