Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84900 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17827 invoked from network); 15 Mar 2015 20:20:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2015 20:20:30 -0000 Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.160 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.160 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.160] ([81.169.146.160:10458] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/64-31306-B89E5055 for ; Sun, 15 Mar 2015 15:20:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1426450824; l=5449; s=domk; d=kelunik.com; h=Content-Type:Cc:To:From:Subject:Date:References:In-Reply-To: MIME-Version; bh=1cnLiPyIjccTuygKcg+xMyfME4c1ucWtf+OkhduWoTA=; b=a8FcrHJ0rECcACZ2nRYExPgFXbRDe1rXoBF0W2bMGl2eR96fTQTxzYIN5BJIdwjiVWP cuQQnPRYdFkzS84xsG8CPYIioiVLGIQS/hMCo1YiL8KPsccQWHgECyckyhgWKoz20b/ai UPMlpXg7f22NcQyqNzETxvuStL1KKq7Jb+c= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLGvomb4bl9EfHtPnRe9w== X-RZG-CLASS-ID: mo00 Received: from mail-we0-f179.google.com ([74.125.82.179]) by smtp.strato.de (RZmta 37.4 AUTH) with ESMTPSA id c02d3er2FKKOOcG (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) for ; Sun, 15 Mar 2015 21:20:24 +0100 (CET) Received: by webcq43 with SMTP id cq43so25103969web.2 for ; Sun, 15 Mar 2015 13:20:24 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.175.202 with SMTP id cc10mr116403639wjc.27.1426450824176; Sun, 15 Mar 2015 13:20:24 -0700 (PDT) Received: by 10.27.222.1 with HTTP; Sun, 15 Mar 2015 13:20:24 -0700 (PDT) In-Reply-To: References: Date: Sun, 15 Mar 2015 21:20:24 +0100 Message-ID: To: Damien Tournoud Cc: Daniel Lowrey , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e013d0f48aa2f06051159765e Subject: Re: [PHP-DEV] [VOTE] Generator Delegation From: me@kelunik.com (Niklas Keller) --089e013d0f48aa2f06051159765e Content-Type: text/plain; charset=UTF-8 2015-03-15 21:13 GMT+01:00 Damien Tournoud : > 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 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 > > > --089e013d0f48aa2f06051159765e--