in reply to Why is the execution order of subexpressions undefined?

What we'd really like to do is outlaw goofy side-effecting code like...
my $rv = func( $i, ++i, $i+2 );
...but that would be a hard problem. So instead we merely say the results are undefined, and hope that it scares away anybody who wants to do something ugly like that.

Replies are listed 'Best First'.
Re^2: Why is the execution order of subexpressions undefined?
by BrowserUk (Patriarch) on Apr 12, 2005 at 19:01 UTC
    What we'd really like to do is outlaw goofy side-effecting code like.

    Hey! Don't knock it. It took me hours of trial and error to come up with that example!


    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?