Lester Caine wrote:
Fact: yield makes functions some kind of "different".
>
Yes, they turn normal functions into continuation functions (functions
which can be exited and reentered dynamically).
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?
I'll ask again since no one has answered ...
In a different way ...
Is the only thing that changes the 'function' into a 'generator' replacing the
call to process the data with 'yield'? ( That would be 'SUSPEND' in an SQL
procedure ) ...
So how DOES an IDE work out the flow in order to correctly check that variables
are defined?
As always, my IDE provides a lot of 'sexy' stuff so that I don't need to have it
built in to the language, and I still can't see how a lot of what is being
loaded in helps with performance which is the only thing that I am interested
in. Performance wise why is yield better than just directly calling a function
to handle the data?
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php