On Tue, Jun 5, 2012 at 10:35 AM, Nikita Popov <nikita....@googlemail.com>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