Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Why is the execution order of subexpressions undefined? (victim)

by Zaxo (Archbishop)
on Apr 12, 2005 at 05:25 UTC ( [id://446851]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why is the execution order of subexpressions undefined? (victim)
in thread Why is the execution order of subexpressions undefined?

Under an "as-if" rule, a bytecode optimizer need not obey the precedence rules, but the initial interpretation of your source must. Precedence and associativity are there to ensure that the expression you write is the one that gets calculated.

After Compline,
Zaxo

  • Comment on Re^3: Why is the execution order of subexpressions undefined? (victim)

Replies are listed 'Best First'.
Re^4: Why is the execution order of subexpressions undefined? (victim)
by tye (Sage) on Apr 12, 2005 at 05:35 UTC

    We are talking order. The order that the calculations get performed need not be as you specified (based solely on precedence and associativity). Even if + might be redefined by the programmer such that x+y != y+x, computing x+y does not require that x be computed before y.

    - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://446851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2024-04-19 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found