Hi, I'd personally find it horrible if $foo[$i] = $bar[$i++]; is executed right-to-left, but given that your examples are a bit weird, I'm not sure if mine is affected. Is it?
Cheers, Andrey. On Aug 13, 2014 10:05 PM, "Nikita Popov" <nikita....@gmail.com> wrote: > > On Wed, Aug 13, 2014 at 7:18 PM, guilhermebla...@gmail.com < > guilhermebla...@gmail.com> wrote: > > > When is this planned to go through voting process? > > > > Before voting I'd like to have some opinions on the behavioral differences > the proposal introduces. In particular I'd like to know whether we are okay > with changing order of evaluation in some places. We document that > evaluation order is undefined, we document that it can change without > warning between versions and that it is inconsistent within one version. > However in the current implementation evaluation is usually left-to-right. > The AST implementation introduces some places where evaluation is > explicitly right-to-left, and not just incidentally. > > So basically the question is whether we are committed to things like > $a[$i++] = $i++ or $a[$i++][$i++] = $j being undefined behavior, in which > case order doesn't matter. If not, I can preserve left-to-right behavior > here (CVs notwithstanding of course), but it would come at the cost of a > good bit of additional complexity in the implementation (I suspect that I'd > have to reintroduce parts of the bp stack to properly shuffle the oplines > around). > > My personal opinion is that things like $a[$i++] = $i++ have zero practical > relevance (and also think that anyone using something like this deserves > any breakage he gets). I'd rather save some lines of code than maintain any > behavior guarantees for that. But some people have contrary opinions on > this, so I'm bringing up the point for discussion. > > Nikita