On Wed, Jul 25, 2012 at 10:36 PM, Lester Caine <les...@lsces.co.uk> wrote:
> But WHY would you not simply put the function that is handling the returned
> data in place of the yield?
> Why do you want to keep exiting and re-entering the 'do loop' when the data
> can simply be forwarded direct to a function to handle it?

This question has come up a few times now, i.e. why one can't just use
callbacks. So I added a section about this, explaining it with a few
examples: 
https://wiki.php.net/rfc/generators#why_not_just_use_callback_functions

Hope it helps,
Nikita

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

Reply via email to