Re: PHP 5.1
| From: | Magnus Määttä | Date: | Mon, 06 Jun 2005 16:58:34 +0000 |
| Subject: | Re: PHP 5.1 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16453@lists.php.net to get a copy of this message | ||
On Monday 06 June 2005 18.42, James Aylett wrote:
> Magnus Määttä wrote:
> > I have small example of "code" that would be so much easier to
> > understand and follow with goto..
> >
> > I removed all actual code to make it a bit shorter, it's actually
> > around 150-200 lines long, just this outer for-loop..
> >
> > for (...; ...; ...) {
> > for (...; ...; ...) {
> > if (...) {
> > ... code ...
> > continue 2;
> > } else {
> > ... code ...
> > break;
> > }
> > }
> > }
>
> [Further snipped to highlight important bits.]
>
> Wouldn't named breaks be just as readable as goto here?
I don't see how putting a name on the number makes it any better and I
still would have to emulate it with loops and breaks and continues,
unless it's actually a code word for goto ;)
Magnus Määttä
--
1699946550: www.msi.com.tw (211.20.189.50) asymm 30 2060424.590ms
reached
Resume: pmtu 1500 hops 1699946550 back 30