hi Rasmus!

On Mon, Aug 20, 2012 at 2:01 AM, Rasmus Lerdorf <ras...@lerdorf.com> wrote:

> I would still like to understand what this generator keyword would
> actually do. I don't see how it would work. Would a function marked
> generator somehow not be allowed to return normally or to finish and not
> return anything? How could this be enforced? I am completely against any
> keyword that is essentially documentation-only.

It is not documentation only (or should not but I have to check the
implementation). It allows the use of the generators features inside
this function. Just like what we have for static methods and this
(somehow).

Also I would really not begin to totally rethink the way generators
work or are defined. There are clean and known ways in other
languages, the closer we get from them the easier it will be to learn
how to use them in PHP.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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

Reply via email to