Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79634 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23383 invoked from network); 14 Dec 2014 13:06:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Dec 2014 13:06:17 -0000 Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 74.125.82.44 mail-wg0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:57263] helo=mail-wg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/D0-17520-74B8D845 for ; Sun, 14 Dec 2014 08:06:16 -0500 Received: by mail-wg0-f44.google.com with SMTP id b13so12544787wgh.3 for ; Sun, 14 Dec 2014 05:06:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type; bh=3qcPz2a0yeiYDK/hZGvz3RSgEq3Rbb/uHQgm5pBpDyo=; b=fmsC8P8Cauj8ffGDfZkfgdFQ0FDrlXs31tBIcobCHFZSC+BXWWPgF1tizjWkLMXyuQ egOsC34tG/UHRngZd+YvCj6N3e6JBvfdO6cqOM8fW0zvMyDKCmaa2lyz/oLDoNmLSda2 weqjZPEbPR5bN5gbPwmsU+4ZJvOLpU8+qEdWNKaQpMiP9YyTxb8owdbpg7ikh6mY3csC su4WZBwzL+jwnJavry/Vmfzb6enGeif5EsroLSb24mc6IHc4nvqiYRkRYZQvGCZ6YvQG wAGqBjv2FSHAgDo9dczdS1q91pdVJVwbecPUR4K7TcXz86Vipef7/kerF+bJdPZrPE4Z OU/Q== X-Gm-Message-State: ALoCoQnPRiVOiB2KMvEKSIypYp6iwuSQtBTJH27FTrGl5g/i/bANrcWOdxuLpcav+4Ir8mjw3FIFrNLH9q3l2lVhctR3IgmYFuSa43N8yXVrmaRGMT5zef/AJGrpZsOisvGvdrayoim2mzPLKSoXg0MZZCF0sO9k6w== X-Received: by 10.180.218.39 with SMTP id pd7mr23636615wic.21.1418562370868; Sun, 14 Dec 2014 05:06:10 -0800 (PST) References: <548D494B.8010901@gmail.com> In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQE6tiVlTJfB1hLdfs9KahE1aOY9OgHTX6XUAYBlPP4CuImFZgHchb58AePvCzGda2q1YA== Date: Sun, 14 Dec 2014 15:06:10 +0200 Message-ID: To: Andrea Faulds , George Bond Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: RE: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0? From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Andrea Faulds [mailto:ajf@ajf.me] > Sent: Sunday, December 14, 2014 2:26 PM > To: George Bond > Cc: PHP internals > Subject: Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0? > > > > On 14 Dec 2014, at 12:01, 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. > > Hey George, > > That sounds like a good approach, actually, although I'm not sure about later > fixing the associativity. If we make it non-associative this does break things, > but very loudly rather than changing code's behaviour. I think we should do > this. Although my inclination would be not to change anything, I agree that if we do decide to change it, George's idea is the best approach. Zeev