Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85492 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28353 invoked from network); 27 Mar 2015 05:10:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2015 05:10:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.180 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.214.180 mail-ob0-f180.google.com Received: from [209.85.214.180] ([209.85.214.180:33357] helo=mail-ob0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/20-24036-B26E4155 for ; Fri, 27 Mar 2015 00:10:03 -0500 Received: by obcxo2 with SMTP id xo2so14783910obc.0 for ; Thu, 26 Mar 2015 22:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Ft8eGdoNNKOQRhQf7UTrzpmRunncR3Q9fkP1UTem9ms=; b=OrC/5wi0xoL6cv1z6OS3DI6unHHhWTO9wJWd8IO4bzQSAJQ2jIG00LtNtFapbhOchF k/3p8bVNrwWGHnq6NFwWuNwQeWHDLvMrkRETv9ParEDz/rqg80CTlSJfBu5lAOqIWpYb OW0pik/heNj+xhBgvXJEnQSUmv32VspJ9tETyQxKRpnymg9ad+ganV2udaHERA8wJu8r By2YDbpzInovkbQmlc76n1GMdTZAWnM5AUYAsRbtJwhbswSBYs+827ueLx0Sgn4N2kdZ qUuVBy1L33kbAIZZJppWxs/aMdNF4R4gjyOoZLZ3gsSDSDtdnXMLSFljIy3m21fqEo/C gEiA== MIME-Version: 1.0 X-Received: by 10.182.28.39 with SMTP id y7mr14615762obg.11.1427433000078; Thu, 26 Mar 2015 22:10:00 -0700 (PDT) Received: by 10.202.214.6 with HTTP; Thu, 26 Mar 2015 22:10:00 -0700 (PDT) In-Reply-To: <20150326224056.GB28328@phcomp.co.uk> References: <20150326224056.GB28328@phcomp.co.uk> Date: Thu, 26 Mar 2015 22:10:00 -0700 Message-ID: To: PHP internals list Content-Type: multipart/alternative; boundary=089e015380d0e9110c05123e24ce Subject: Re: [PHP-DEV] [RFC] Fix the Tenary Operator -- Please!? Please? From: kris.craig@gmail.com (Kris Craig) --089e015380d0e9110c05123e24ce Content-Type: text/plain; charset=UTF-8 On Thu, Mar 26, 2015 at 3:40 PM, Alain Williams wrote: > On Thu, Mar 26, 2015 at 10:31:00PM +0000, Rowan Collins wrote: > > > What I've always been annoyed by is the *precedence* of the operator - > having to add brackets to mix it with string concatenation, etc - which it > turns out to is the same in all sorts of languages. > > It is the ''all sorts of languages'' that is key here. The point is that > PHP > associativity for ?: is different from other languages and it is that that > confuses and leads to bugs. What is right/wrong is not as important as all > others doing it the other way. > > -- > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > The feature freeze thing kinda rings hollow for me, as well, because we were debating this fairly recently before the feature freeze and we still got pushback from people who feared BC breakage. This is a bug (whether we're calling it one or not, it is a bug) and it needs to be fixed. PHP does handle it differently, yes, but the different way in which it's handling it is wrong. At least, that seems to be the prevailing opinion among devs. If we don't put this in 7.0 because of the feature freeze, it needs to go into the next minor version if the RFC passes. We should've pulled the trigger on this before the feature freeze and we shouldn't have to wait until 8.0 because of that. --Kris --089e015380d0e9110c05123e24ce--