Re: [VOTE] Generator Delegation

From: Date: Sun, 15 Mar 2015 20:39:40 +0000
Subject: Re: [VOTE] Generator Delegation
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-84906@lists.php.net to get a copy of this message
On Sun, Mar 15, 2015 at 9:35 PM, Daniel Lowrey <rdlowrey@php.net> wrote: > This is actually a *vastly* inferior solution to language-level support > for generator returns. greenlet/gevent does it this way because these > libraries were created before Python supported generator delegation (and > continue supporting Python 2.5). When you have generator returns you don't > need any of that additional cruft. Instead, a language supporting generator > returns can simply yield promises (or whatever concurrency primitive you > prefer). Period. > Hi Daniel, I actually disagree here. Using generators as coroutine is a hack, and is vastly inferior to having actual coroutine support in the language, but obviously we do what we can with the language we have. (Yes, I am in the camp that *really* dislike explicit yielding.) I do understand where this is coming from, so changing my vote to yes on the other RFC. Damien

« previous php.internals (#84906) next »