Re: Re: Labeled Breaks (not the G-word)

From: Date: Wed, 30 Nov 2005 09:49:29 +0000
Subject: Re: Re: Labeled Breaks (not the G-word)
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-20892@lists.php.net to get a copy of this message
Ron Korving wrote:
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.
FULLACK, labled breaks are great if you really just want to get out of nested loops or if statements, just in combination with error handling the GOTO variant looks more readable in some cases -- Hartmut Holzgraefe, Senior Support Engineer . MySQL AB, www.mysql.com

« previous php.internals (#20892) next »