Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Auto-increment frenzyby Abigail-II (Bishop) |
on Aug 27, 2003 at 08:08 UTC ( [id://286971]=note: print w/replies, xml ) | Need Help?? |
Whilst the evaluation order is undefined Those two lines contradict each other. perl -MO=Deparse,-p only shows you precedenceorder, not evaluation order. Take for instance The evaluation order might be:
The order of evaluation is UNDEFINED, and therefore, the entire statement is has undefined behaviour. And yes, I know the argument, "If I run the program, it always returns XXX". That doesn't say anything. The order in which keys are returned from a hash is undefined as well. If you write a program that inserts the numbers 1 to 100 in a hash, in that order, and then fetches the keys, you will get the same order on each run of the program. Does that mean the order is defined? No, because that fixed order will no longer happen with 5.8.1. Then the order will differ from run to run. And it's safe to introduce that in a maintainance release, because the order in which keys are returned is undefined, even if you think you can predict it. Abigail
In Section
Meditations
|
|