in reply to Re^22: Why is the execution order of subexpressions undefined?
in thread Why is the execution order of subexpressions undefined?

And so far, noone has offered a single good reason why EO should not be defined in Perl
It is bad form to code like you want to. Just like goto. It makes the code ugly and hard to understand. But of course this point has been made a number of times already, you just choose to ignore it.
  • Comment on Re^23: Why is the execution order of subexpressions undefined?

Replies are listed 'Best First'.
Re^24: Why is the execution order of subexpressions undefined?
by BrowserUk (Patriarch) on Apr 15, 2005 at 14:42 UTC

    Hey. If goto is bad, why is it in the language?

    It is rarely used, but it is there for those occasions when it is necessary, or easier or clearer.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco.
    Rule 1 has a caveat! -- Who broke the cabal?
      Hey. If EOD is bad, why is it in the language?

      It is rarely used, but it is there for those occasions when it is necessary, or easier or clearer.

      The reason that the traditional goto is in Perl is that it makes it easier to port programs to Perl. See the a2ps2p utility. The lack of labelled loop control makes goto useful far more often in C, but in Perl you can always rewrite a given piece of code to not use goto and yet run identically algorithmically. (Knuth wrote a famous paper about this in the 70s.)

      Of course there is always the unexpected. I have seen exactly one (Switch) use of goto in Perl that I would consider justifiable.

        tilly,
        Have you changed your mind or lost it? At least twice in the past, you have said there are 2 neccessary uses of traditional goto in Perl. Even if you didn't mean necessary, you still said two.

        Cheers - L~R

        For anyone who doesn't have a sense of humor, suggesting that tilly might have lost his mind is a joke