On 05/06/12 19:35, Nikita Popov wrote:
Hi internals!
Hi Nikita,

Before going any further I'd like to get some comments about what you
think of adding generator support to PHP.
I have always hoped to see the “yield” keywork introduced in PHP. I even suggested that in this mailing-list at least one time but I'm very glad to see some patches coming out.

In addition to Gustavo's remarks, I wonder how the GC would collect a Generator object that is not use anymore (especially with a referenced yield). Does it fit to the current CG strategy or do we need an extra strategy? I would notice that the “Yield by reference” section does not exist but you have targeted it). Moreover, I wonder how a “recursive yield” would act (something like “public function *f ( … ) { … yield $this->f(…); … }”). It is possible? Is it anticipated?

Thanks for you work.

Cheers.

--
Ivan Enderlin
Developer of Hoa
http://hoa.42/ or http://hoa-project.net/

PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis)
http://disc.univ-fcomte.fr/ and http://www.inria.fr/

Member of HTML and WebApps Working Group of W3C
http://w3.org/



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to