Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76513 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56317 invoked from network); 14 Aug 2014 10:35:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2014 10:35:26 -0000 Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.179 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 74.125.82.179 mail-we0-f179.google.com Received: from [74.125.82.179] ([74.125.82.179:45728] helo=mail-we0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/A2-40673-DE09CE35 for ; Thu, 14 Aug 2014 06:35:26 -0400 Received: by mail-we0-f179.google.com with SMTP id u57so901103wes.10 for ; Thu, 14 Aug 2014 03:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=u395fFAhUioWqv3OXeR/Mvr0kcAocWpvhAmx2to5pMs=; b=HcwJ7xCdEgeDO7XM4m+epBzxoEtf+S3u/7odYWohpO6CMdXhoJBwC7c5+m0CMoWNBW aIZGioLE8RWHL5t0bwwc8OIpc2aF1TGbohiCsv19eqvrVgSPwGDmbY8RfMDfy4xAAF/g QgFB/9EUh2wwho4Xq5zcP1Q104miXA25IanfOxbElPA+YHXn56vooImRuJD/sVNWMpOq Tu4D4fZt6PEB5Sq88VySPdoKXHH4E2rIU6M+qNZvul7sydZx0ss07bZuUzjwi4EADl1r lSznv+UUzLuKnzBgqCTxmenFCGFLAIOXE+zmAxucc2mu6mC+6qDgOgoDLFZnPteO+FRf 72ng== X-Received: by 10.194.90.114 with SMTP id bv18mr11040794wjb.63.1408012521685; Thu, 14 Aug 2014 03:35:21 -0700 (PDT) Received: from lepisma.bemi (178-18-170-101.customer.bnet.at. [178.18.170.101]) by mx.google.com with ESMTPSA id 10sm10599900wjr.22.2014.08.14.03.35.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Aug 2014 03:35:20 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <20140814093338.GY11050@phcomp.co.uk> Date: Thu, 14 Aug 2014 12:35:53 +0200 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <3F1B2834-3939-4F86-86E0-207D2CE469D6@ajf.me> <20140814093338.GY11050@phcomp.co.uk> To: Alain Williams X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Introduce Abstract Syntax Tree From: mike.php.net@gmail.com (Michael Wallner) On 14 08 2014, at 11:33, Alain Williams wrote: > On Thu, Aug 14, 2014 at 10:25:11AM +0100, Chris Wright wrote: >=20 >>> My personal opinion is that things like $a[$i++] =3D $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. >>=20 >> +1. It's documented as undefined behaviour, doing it in the first >> place is highly non-obvious to the reader with a clear ambiguity, = it's >> fine by me to break from the current behaviour. >=20 > +1 >=20 > It is OK to define some things as undefined and have them break = between releases - > even minor releases. I always teach it as undefined - as it is in most > programming languages. >=20 > Likewise, if the next 2 characters on input are 'a' then 'b' what gets = assigned > could either be 'ab' or 'ba': >=20 > $TwoChars =3D fgetc($in) . fgetc($in); >=20 > Some code is just broken. Wat? No. This is totally different to two in/decrements on one line. = This has to be executed in order. Cheers, Mike