Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79699 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66923 invoked from network); 16 Dec 2014 08:30:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Dec 2014 08:30:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.215.49 mail-la0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:57483] helo=mail-la0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/95-34244-88DEF845 for ; Tue, 16 Dec 2014 03:30:02 -0500 Received: by mail-la0-f49.google.com with SMTP id hs14so10475866lab.8 for ; Tue, 16 Dec 2014 00:29:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FZ6Ylc00jUltdcDVhHdijXxyy/nXgJjcwzUjFOD/f04=; b=NbEBfqY/t0zZ0CRZpXnoZ4V8x4EgyIep01A+CyrutE7lHDF9Tq8CgIZHWmRwUZWQDV h/7OEXDmPMip6meqFMLjzIkjzmvlursOnNNMDEjdNodSKbgQ9pWIwt2pQHkmF2153VID Z5yxp+pa/GSbzwuU5COQ+ah/if+ZQhmwxQZTqHRzuMKqQIf2gvQeGDZPeGwMSYq9V4rz tYIEHp7Db/zZOH314HyGHHT6a9CUMdlKzfU4dh8Y1Lvi+tPzVR/YdXYyDt9NwS8cV7tX O+tXhGfGJRr+o2jEhJyVLQq9q2QshhG3vRsZ/xocuXhN5f9DJ1tpgSMl8XS/npFymTM5 gg6w== X-Gm-Message-State: ALoCoQnxi6pcjIod5Rj6n61KzazxlOP+ZEr7mn1E042vZRHk+eQuzPX21jXd4RgAtEoaS6WKe1XZ MIME-Version: 1.0 X-Received: by 10.152.206.108 with SMTP id ln12mr29300639lac.3.1418718597844; Tue, 16 Dec 2014 00:29:57 -0800 (PST) Sender: php@golemon.com Received: by 10.112.130.138 with HTTP; Tue, 16 Dec 2014 00:29:57 -0800 (PST) X-Originating-IP: [69.63.185.56] In-Reply-To: References: <548D494B.8010901@gmail.com> Date: Tue, 16 Dec 2014 00:29:57 -0800 X-Google-Sender-Auth: Nwt34d7cR3HlJxRW8YHEXOA9Fv0 Message-ID: To: Derick Rethans Cc: George Bond , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0? From: pollita@php.net (Sara Golemon) On Mon, Dec 15, 2014 at 8:56 AM, Derick Rethans wrote: > On Sun, 14 Dec 2014, George Bond wrote: >> If you wanted an upgrade path that was not Evil (in the sense of not >> introducing subtle and hard-to-diagnose bugs), could you not change >> the operator to be *un*associative in PHP7? That would effectively >> just make concrete the discouragement/deprecation that's already in >> the documentation, and would produce irritating but very visible >> errors for anyone still actually using this functionality, as well as >> making them alter their code in a forward-compatible way. Then if you >> want to think really long term, plan to implement the 'correct' >> associativity in the *next* major version. > > As long as this unassociativity turns it into a hard syntax error (ie, > "php -l" will catch it out), I am not against this. > I'm with Derick. We either don't change the implicit associativity, or we make ambiguous statements a parse error with a clear link to the documentation explaining to add parens in order to make the associativity explicit. -Sara