Re: Re: Labeled Breaks (not the G-word)
| From: | Ron Korving | Date: | Wed, 30 Nov 2005 09:33:25 +0000 |
| Subject: | Re: Re: Labeled Breaks (not the G-word) | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20887@lists.php.net to get a copy of this message | ||
Well that's because labeled breaks should (in "our" opinion) be implemented
paralel to goto. It is simply not the same. Of course you could break out of
loops with a goto statement, but I'd much prefer true labeled breaks, where
the label is set for the loop-construct itself, not after the construct.
So labeled breaks have only 1 use case:
> * escaping deeply nested loops or if statements
'goto' should solve the others.
Ron
"Hartmut Holzgraefe" <hartmut@php.net> schreef in bericht
news:438D7053.8040902@php.net...
> well, this is only handling one of the three GOTO use cases
> that we seem to agree on as being 'ok'
>
> * escaping deeply nested loops or if statements
> * jumping to a central error handling/cleanup point
> * state machine implementations
> --
> Hartmut Holzgraefe, Senior Support Engineer .
> MySQL AB, www.mysql.com