Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60742 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15270 invoked from network); 5 Jun 2012 18:32:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2012 18:32:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wg0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:58620] helo=mail-wg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/5B-46677-2C05ECF4 for ; Tue, 05 Jun 2012 14:32:34 -0400 Received: by wgbfg15 with SMTP id fg15so4517102wgb.11 for ; Tue, 05 Jun 2012 11:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GyocsvWUGS+QszosBXRpV8ZJ/ojgTbZ+MX7g4WW8ZJc=; b=M3RInVJkBDl2LotjWFB+XkB7VnP1M4net/LY+hLJ4jV3LSqO33AqDJ3fXMEvpZ0kul D8QMywCrqt7HSMCUC3ohnDd6WDFE4Epif0aRylBdy/sjbANiHy9/d81OKKBP2LcY5tJW gIwLU4ISbVHnPBi+aVW0udCUqhwQ/hfXMfjZxsHBhpvhsiDZ+hBV/bZeSG163/FpMUd+ 8ZDcvH/ZdYzf8KuPn6oifNZ6f5/jGeHSpPuX4MeK7bJhSr4JNzVyWyEPqTpbF6pwAP8h HOx6G59xNJCQThJOxbF0OcRpEukjtf9JpL0YwQqpy9QdpyCB0aqCKn2CrLkhrZQM1KFb rfBA== MIME-Version: 1.0 Received: by 10.216.193.129 with SMTP id k1mr13983539wen.201.1338921151612; Tue, 05 Jun 2012 11:32:31 -0700 (PDT) Received: by 10.223.160.133 with HTTP; Tue, 5 Jun 2012 11:32:31 -0700 (PDT) In-Reply-To: References: Date: Tue, 5 Jun 2012 11:32:31 -0700 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=0016e6dee7749fc90c04c1bddf93 Subject: Re: [PHP-DEV] Generators in PHP From: kris.craig@gmail.com (Kris Craig) --0016e6dee7749fc90c04c1bddf93 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jun 5, 2012 at 10:35 AM, Nikita Popov wrote: > Hi internals! > > In the last few days I've created a proof of concept implementation > for generators in PHP. It's not yet complete, but the basic > functionality is there: > https://github.com/nikic/php-src/tree/addGeneratorsSupport > > The implementation is outlined in the RFC-stub here: > https://wiki.php.net/rfc/generators > > Before going any further I'd like to get some comments about what you > think of adding generator support to PHP. > > If you don't know what generators are you should have a look at the > "Introduction" section in the above RFC or in the Python documentation > at http://wiki.python.org/moin/Generators. > > Nikita > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Some observations and questions: 1. In the RFC, the top example claims to make use of the file() function, but in fact does not. Did you mean fopen()? Or did you mean that this to be an example of someone writing their own file() function in PHP for some reason (the "userland" reference is a bit confusing IMHO given the context). 2. In what way(s) do you believe this approach would differ from inline functions and what advantage(s) do you see in those differences? 3. What release version do you believe should be targetted for this? --Kris --0016e6dee7749fc90c04c1bddf93--