Sam,

I'm not saying it's a good idea, but this would allow for pythonic
style generators.  http://wiki.python.org/moin/Generators

Just pointing out one potential use-case...

Anthony

On Mon, Apr 2, 2012 at 4:35 PM, Samuel Giles <sam.e.gi...@gmail.com> wrote:
> Hi Internals
>
> function test()
>> {
>>  echo "Begin Test!\n";
>>
>>  throw new Interrupt();
>>
>>  echo "Execution resumed!";
>> }
>>
>> try
>> {
>>  test();
>> }
>> catch (Interrupt $e)
>> {
>>  echo "Execution interrupted.\n";
>>  resume;
>> }
>>
>> The output of this would be:
>>
>> Begin Test!
>> Execution interrupted.
>> Execution resumed!
>>
>
> My major concern would be, how does this* really* add to PHP?  Perhaps I'm
> missing the point, but what would this allow that can't be done in some
> form using well defined "patterns", for lack of a better word.
>
> I'm not keen on the idea of throwing things such as Interrupts either, it
> doesn't quite fit with their general use case.
>
> Sam

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

Reply via email to