This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is there any plans or work going on gcc related to c++ coroutines?




On 08/19/2017 12:19 PM, Andrew Haley wrote:

Really take boost.coroutine2, some Macro ridden coroutine libraries,
or any c coroutine task library and compare what N4680 draft proposes.
Which of them is feel more natural and easier integrate to base C++?

No one suggests it is "critical". But do not think that interest is
special or strange, it just isn't.
Oh, please.  SIMULA had coroutines working perfectly well, and they
were very useful, and that was *exactly* fifty years ago!  I am just
amused, that is all.

But there is a serious question behind all of this: why now?
Coroutines are not particularly difficult to implement, and could have
been done at any time.  I'm not opposed to doing it now!


There is some confusion here. Stackful coroutines are available for C and C++ since forever, and don't require compiler support. I've written such libraries at least twice, and perhaps more.

Stackless coroutines require compiler support for C and C++, and have been made available for other popular languages recently. Like I mentioned elsewhere, they are very useful for asynchronous programming, and also for implementing complex iterators and generators in a simple way.

As to why now? They are being standardized now. Why are they being standardized now? Pressure from other popular languages, and standardization backlog, perhaps.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]