in reply to Re^2: Do yourself a favor and upgrade (Bug in 5.8.0)
in thread Do yourself a favor and upgrade (Bug in 5.8.0)

By the way - that paper was written in 1968. You're damn near 40 years behind best practices when you write code with gotos in it.

Please see this thread, and especially this comment:

"People who just balk at any sight of a goto have at best heard about Dijkstra's article Go To Considered Harmful (which wasn't titles bij Dijkstra, but by Hoare), but never read the paper, or not understood it. Dijkstra just warns that goto can easily lead to unstructured programs, he doesn't say it's evil all the time."

Bye
 PetaMem
    All Perl:   MT, NLP, NLU

  • Comment on Re^3: Do yourself a favor and upgrade (Bug in 5.8.0)

Replies are listed 'Best First'.
Re^4: Do yourself a favor and upgrade (Bug in 5.8.0)
by eric256 (Parson) on Apr 28, 2005 at 22:06 UTC

    While that might be true it doesn't mean it is true in this case or most cases. From reading your code it would seem to me that the following works the same but is easier to read. Not saying yours is bad, but 99% of the time if you reach for GOTO you could probably phrase the problem differently so that it is not needed.

    while ($idx_la > $i) { &log("I: $i IDX_LA: $idx_la\n"); $phrase = join ' ', @$sl_ctl[$i..$idx_la]; $rawtr = $self->get_rawtr($phrase); if ($@$rawtr) { my $disam = $self->disambiguate($phrase, $rawtr, $i,$idx_la); push @tl_rtl, $disam; last; } $idx_la--; push @tl_rtl, $phrase; }


    ___________
    Eric Hodges