Boost logo

Boost :

Subject: Re: [boost] [coroutine2] Difference between coroutine and coroutine2
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-06-23 05:49:34


On Tue, Jun 23, 2015 at 11:44 AM, Rob Stewart <rob.stewart_at_[hidden]> wrote:
> On June 22, 2015 1:13:54 PM EDT, "Vicente J. Botet Escriba" <vicente.botet_at_[hidden]> wrote:
>> Le 22/06/15 11:10, Rob Stewart a écrit :
>> > On June 22, 2015 4:41:05 AM EDT, Oliver Kowalke
>> <oliver.kowalke_at_[hidden]> wrote:
>> >> 2015-06-22 10:29 GMT+02:00 Rob Stewart <rob.stewart_at_[hidden]>:
>> >>
>> >>> If there's only one kind of coroutine in coroutine2, why isn't it
>> >> just
>> >>> named "coroutine"?
>> >> asymmetric_coroutine<> describes the coroutine type (assymetric
>> >> transfer of
>> >> execution control),
>> > With only one kind, the documentation already describes how it
>> behaves. Having asymmetric_coroutine suggests other variations are
>> expected in the future.
>> >
>> >> but coroutine.hpp contains:
>> >>
>> >> template< typename T >
>> >> using coroutine = asymmetric_coroutine< T >;
>> >>
>> >> so you could use coroutine<> if desired.
>> > If you think asymmetric_coroutine is necessary, and clearly I do
>> not, you should reverse those. That is, asymmetric_coroutine should be
>> the alias.
>> >
>> I don't agree. asymmetric_coroutine is the correct term. This let us
>> to add again symmetric_coroutine if the need comeback.
>
> If that must remain a possibility, then there should be no "coroutine" alias and the header should be asymmetric_coroutine.hpp.
>
> If symmetric_coroutine was removed for good reason, does that reason not preclude its return? I don't have that answer. I'm just inferring from the result.

I share Rob's confusion. If the 'coroutine' alias is just some sort of
a default coroutine then at least its naming is inappropriate (I would
suggest something like 'default_coroutine', if such alias is at all
needed). If the library does not plan to add a symmetric_coroutine
then I see no point in the 'asymmetric' qualification.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk