in reply to Re: Auto-increment frenzy
in thread Auto-increment frenzy
Whilst the evaluation order is undefinedThe behaviour is even definable and consistant
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:$a = $a ++ + $a ++;
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Auto-increment frenzy
by rir (Vicar) on Aug 27, 2003 at 14:12 UTC | |
by Abigail-II (Bishop) on Aug 27, 2003 at 14:21 UTC | |
|
Re: Re: Auto-increment frenzy
by BrowserUk (Patriarch) on Aug 27, 2003 at 15:34 UTC |