2015-03-15 21:13 GMT+01:00 Damien Tournoud <d...@damz.org>: > Hi Daniel, > > Would you mind clarifying the relationship between the "Generator > Delegation" RFC and the "Generator Return Expressions" RFC? > > While I really appreciate the "Generator Delegation" RFC, the "Generator > Return Expressions" looks both unnecessary and kind of a hack to me. In > evented system based on coroutine/generators (for example Python > greenlet/gevent) the ability to "return a value" is handled higher up than > the generator/coroutine itself, which has other advantages (like the > ability to yield until the value is available, instead of simply throwing, > etc...). Essentially, "returning a value" is an abstraction of the > cooperative framework (usually an event loop), not of the generator itself. >
I already wanted to ask why you voted no on return expressions. The reason for having delegation dependent on return expression is that coroutines can have a result that should be available just like any other function. $result = yield from coroutine(); Without return expressions, there would be no way to access the result of a coroutine. The relevant section in the RFC should be the following: https://wiki.php.net/rfc/generator-return-expressions#use-casecoroutine_return_values I hope that clarifies it, if not, please ask again. Regards, Niklas Damien > > > On Sun, Mar 15, 2015 at 8:18 PM, Daniel Lowrey <rdlow...@php.net> wrote: > > > Hi folks! > > > > As the discussion period has reached its conclusion I'd like to announce > a > > two week voting period on the Generator Delegation RFC here: > > > > https://wiki.php.net/rfc/generator-delegation > > > > Voting ends Sunday, March 29. > > > > I know everyone is busy and your time is valuable; thanks for spending a > > few minutes to review the proposal. If you have any questions please > don't > > hesitate to ask. > > > > -Daniel > > >