Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76497 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87330 invoked from network); 13 Aug 2014 19:25:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2014 19:25:36 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.218.47 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.47 mail-oi0-f47.google.com Received: from [209.85.218.47] ([209.85.218.47:59194] helo=mail-oi0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/C2-03780-FABBBE35 for ; Wed, 13 Aug 2014 15:25:36 -0400 Received: by mail-oi0-f47.google.com with SMTP id x69so146703oia.34 for ; Wed, 13 Aug 2014 12:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LOHfUHhZlbEBoc71fBK2njGe0XQCJbWPm0tTBZmHiI4=; b=o/pzSEgZkKgw9xVt3nHE52lWFp4nA5DKpBKFYbvBdR3bN/PH7yA9+wr0Gwe+UpnEcG tx70EBSfDObYH1Qu1ZnGxDzImg2KFOEC7RVtjUekjZ4maWMg2LcvbZVUA2eBs00iBI75 t73BLC4G1uaWE530iFW717xLZj9FDLzI9hirU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=LOHfUHhZlbEBoc71fBK2njGe0XQCJbWPm0tTBZmHiI4=; b=J9KlIqTcqHR7EFnEgxoK1mpjcBlP/Lnmn9xyjqphqz0n0U4N1Cf8XpBaP7MhhCvOwx ev/ApVP/x1S8zsFY6zoodI9B0D7Z63nogSe6uZsLEuw68vo6zKd3rJRaOIS6cJDoGzle AjYBO29Z44MoU1MahpaU2turl6batSILaJHp7M/R5eniR1EA7a5Axmj7zARRdRS4O8fs LhZWDDY2mYnvJtSEzgTqJUhOYzEOOMGCHcWcAWPNweO+BMEMRScmNFhs+nUIznL0pz2p d1/mKjlLYY1yScxWlyq4sw3C4ycIRU/BrPoDVR5XC//adr7Z/NNToZTi+rEyzKZtwF6v S7dQ== X-Gm-Message-State: ALoCoQmq5j/P5lY6hyA21XIXTXsQhAi6BXYQ3oYhkNQ+g+MEZ5mtTLgNLRAeHOjYaxnd+3Wjwzod MIME-Version: 1.0 X-Received: by 10.60.62.234 with SMTP id b10mr7028861oes.3.1407957933277; Wed, 13 Aug 2014 12:25:33 -0700 (PDT) Received: by 10.202.75.205 with HTTP; Wed, 13 Aug 2014 12:25:33 -0700 (PDT) Received: by 10.202.75.205 with HTTP; Wed, 13 Aug 2014 12:25:33 -0700 (PDT) In-Reply-To: References: <3F1B2834-3939-4F86-86E0-207D2CE469D6@ajf.me> Date: Wed, 13 Aug 2014 22:25:33 +0300 Message-ID: To: Nikita Popov Cc: internals@lists.php.net, Andrea Faulds , "guilhermeblanco@gmail.com" Content-Type: multipart/alternative; boundary=047d7b45102c78ecee050087c01a Subject: Re: [PHP-DEV] [RFC] Introduce Abstract Syntax Tree From: narf@devilix.net (Andrey Andreev) --047d7b45102c78ecee050087c01a Content-Type: text/plain; charset=UTF-8 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" wrote: > > On Wed, Aug 13, 2014 at 7:18 PM, guilhermeblanco@gmail.com < > guilhermeblanco@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 --047d7b45102c78ecee050087c01a--