Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85494 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34868 invoked from network); 27 Mar 2015 06:18:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2015 06:18:04 -0000 Authentication-Results: pb1.pair.com header.from=laruence@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=xinchen.h@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.217.175 as permitted sender) X-PHP-List-Original-Sender: xinchen.h@zend.com X-Host-Fingerprint: 209.85.217.175 mail-lb0-f175.google.com Received: from [209.85.217.175] ([209.85.217.175:32797] helo=mail-lb0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/70-31507-816F4155 for ; Fri, 27 Mar 2015 01:18:01 -0500 Received: by lbcmq2 with SMTP id mq2so56736011lbc.0 for ; Thu, 26 Mar 2015 23:17:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=95ULQt8EbwzvYbe3tWW/Oujk8h8oKzp9fMzDHKbuMfA=; b=mKP+DdGHT9V20KFa1gcN/U6DS4wFGVXyxlS8sv+bSgnMG8Lnrg18Wv/wiiMHZkHqVh 5HpRVxn0wynDgsohd9GSNyF+JFlAksm/x4gA7JRiUsA1Zku4IYZKXFSMsTQpXsMYUVxk ykPFM9dGhDzMzIf5rgZK/knEuMc/v2v11y5AFsvBr0tb0L5/RUUL97JHC8fcw8o/ZGPf dtNTDsEHtqF02FpOil4dXU2iLaJVNBlfDrEJszV/1dF5kiWXPcnNRIoVedHrw1VoMD3U 4PG13DqKOEzp5IwK42SxtHXAv+azlVOWb5GlSGxGu7gADmYwC9qCHIiKyjxMXnExOSjb +DNA== X-Gm-Message-State: ALoCoQkvA/yo9BWKktcRx3VsmW/XXiJrU2Q6Cn/50O4ksXB/TFbI5GveFcl299VN/x1qsafEKFSncJ/gFRN1qJI2MWaCeu1A1UiB/CapIrxWviI6jmCeC2DM92yRRhaoKu+Qf9t0zp86FXpcJcw88nHWuwibf7qfEQ== X-Received: by 10.152.178.197 with SMTP id da5mr16932801lac.56.1427437076869; Thu, 26 Mar 2015 23:17:56 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPSA id iy9sm165714lbc.8.2015.03.26.23.17.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 23:17:56 -0700 (PDT) Received: by lbcmq2 with SMTP id mq2so56735601lbc.0 for ; Thu, 26 Mar 2015 23:17:54 -0700 (PDT) X-Received: by 10.112.210.201 with SMTP id mw9mr16651689lbc.13.1427437074978; Thu, 26 Mar 2015 23:17:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.203.39 with HTTP; Thu, 26 Mar 2015 23:17:34 -0700 (PDT) In-Reply-To: References: <20150326224056.GB28328@phcomp.co.uk> Date: Fri, 27 Mar 2015 14:17:34 +0800 Message-ID: To: Kris Craig Cc: PHP internals list Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Fix the Tenary Operator -- Please!? Please? From: laruence@php.net (Xinchen Hui) Hey: On Fri, Mar 27, 2015 at 1:10 PM, Kris Craig wrote: > 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. > I don't think freeze should block bug fixes... thanks > --Kris -- Xinchen Hui @Laruence http://www.laruence.com/