Re: [RFC] Introduce Abstract Syntax Tree

From: Date: Thu, 14 Aug 2014 09:33:38 +0000
Subject: Re: [RFC] Introduce Abstract Syntax Tree
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-76509@lists.php.net to get a copy of this message
On Thu, Aug 14, 2014 at 10:25:11AM +0100, Chris Wright wrote: > > 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. > > +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. +1 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. Likewise, if the next 2 characters on input are 'a' then 'b' what gets assigned could either be 'ab' or 'ba': $TwoChars = fgetc($in) . fgetc($in); Some code is just broken. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include <std_disclaimer.h>

« previous php.internals (#76509) next »