Re: Generators in PHP

From: Date: Wed, 06 Jun 2012 15:45:56 +0000
Subject: Re: Generators in PHP
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 06/06/12 12:20, Ivan Enderlin @ Hoa wrote:
> 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. 
Me too!

It's syntactic sugar around iterators, but a very welcome one.

I'm not sure about the usage as coroutine, though. It looks odd that
->send() which appears into yield.



Thread (142 messages)

« previous php.internals (#60761) next »