Topic: Feedback and questions: p0114r0.pdf
Author: =?UTF-8?Q?Germ=C3=A1n_Diago?= <germandiago@gmail.com>
Date: Tue, 13 Oct 2015 00:24:15 -0700 (PDT)
Raw View
------=_Part_6870_1849334663.1444721055085
Content-Type: multipart/alternative;
boundary="----=_Part_6871_523729330.1444721055085"
------=_Part_6871_523729330.1444721055085
Content-Type: text/plain; charset=UTF-8
Hello everyone,
I am paying some attention to proposals for coroutines and
would like to ask some questions about resumable expressions.
1. I think that there is something in the paper that cannot be done that is
shown as an example:
In struct generator_impl there is a resumable auto member variable. AFAIK,
auto is forbidden
as a member variable. So this creates a problem: how can the resumable
function be stored
without type erasure as a member variable?
2. Implementing the yielder. In the paper I see a class:
//Type erased, same as in await proposal.
generator<int> fib(int n);
It could be possible to have a resumable function that does this?
//Imagine we are using concepts
template <Integral I>
resumable Generator<I> fib(int n);
thus, eliminating type erasure but with the high level interface?
3. it is not clear to me if in resumable expressions we can return a value.
I think it cannot
because you can only use "break resumable". You can represent the returned
value in a
yielder, as the paper does, and
save and pass state around, which is good.
But I would like to know if it is possible to have a high-level,
library based interface for yield that is as easy to use as the one in
resumable functions
proposal and that does not require type erasure.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_6871_523729330.1444721055085
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hello everyone,<br><br>I am paying some attention to propo=
sals for coroutines and<br>would like to ask some questions about resumable=
expressions.<br><br>1. I think that there is something in the paper that c=
annot be done that is shown as an example:<br><br>In struct=09
=C2=A0generator_impl there is a resumable auto member variable. AFAIK, aut=
o is forbidden<br>as a member variable. So this creates a problem: how can =
the resumable function be stored<br>without type erasure as a member variab=
le?<br><br>2. Implementing the yielder. In the paper I see a class:<br><br>=
//Type erased, same as in await proposal.<br>generator<int>=09
=C2=A0fib(int=09
n);<br><br>It could be possible to have a resumable function that does this=
?<br><br>//Imagine we are using concepts<br>template <Integral I><br>=
resumable Generator<I> fib(int n);<br><br>thus, eliminating type eras=
ure but with the high level interface?<br><br>3. it is not clear to me if i=
n resumable expressions we can return a value. I think it cannot<br>=C2=A0b=
ecause you can only use "break resumable". You can represent the =
returned value in a<br>yielder, as the paper does, and<br>save and pass sta=
te around, which is good. <br>But I would like to know if it is possible to=
have a high-level,<br>library based interface for yield that is as easy to=
use as the one in resumable functions <br>proposal and that does not requi=
re type erasure.<br><br><br><br><br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_6871_523729330.1444721055085--
------=_Part_6870_1849334663.1444721055085--
.