Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83626 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85891 invoked from network); 24 Feb 2015 02:53:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 02:53:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.51 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.192.51 mail-qg0-f51.google.com Received: from [209.85.192.51] ([209.85.192.51:64703] helo=mail-qg0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/00-20131-5C7EBE45 for ; Mon, 23 Feb 2015 21:53:58 -0500 Received: by mail-qg0-f51.google.com with SMTP id z60so27920935qgd.10 for ; Mon, 23 Feb 2015 18:53:55 -0800 (PST) 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 :cc:content-type; bh=GWEHEvDN4Puvu6uiY414zLxelVSAPV8nzK5BFNM62kw=; b=Oal7/RlZw/EgcxIyi3sHnMhjQyiLXqcUSaw3J2AMO+TmVqkGWJSsaWfO62kWFG+KCO i963MqmlI4Ooa4SyUTWlNpe7B22CbOsQten3l1AfBwTRQLWyJwBLDXYYI1kUHPnIupJh GKtGIxrL1V6tnukReF4wgbeAAWAHsqBmyXV62bjzeSIzfVTQzcnPN268Oac/JBs69sK5 +DqTFsiewKqF3/vsEZ88hvz8vZI2YCUmhvedFffK/1vv2F0mCoZyiB4jT2T9aLJbAqoD X5qj6Sxf4v6sz+wt382XiuUhW+uDS7oi8fjwbNX6iN9kfth9L0JDgGhxYHlBN9h4FOT3 ISVw== MIME-Version: 1.0 X-Received: by 10.229.191.3 with SMTP id dk3mr32431999qcb.30.1424746435275; Mon, 23 Feb 2015 18:53:55 -0800 (PST) Received: by 10.96.39.195 with HTTP; Mon, 23 Feb 2015 18:53:55 -0800 (PST) In-Reply-To: <408f8a8532601425b1c501f333fa6135@mail.gmail.com> References: <7ef509ef10bb345c792f9d259c7a3fbb@mail.gmail.com> <9aec85c81b49009c6238ff6d8be27cd4@mail.gmail.com> <2dcfd9f4a3f0f9bbf2a13f679359e6ea@mail.gmail.com> <6844321d7134506b1061c5f18a275069@mail.gmail.com> <408f8a8532601425b1c501f333fa6135@mail.gmail.com> Date: Mon, 23 Feb 2015 18:53:55 -0800 Message-ID: To: Zeev Suraski Cc: Anthony Ferrara , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Coercive Scalar Type Hints RFC From: pierre.php@gmail.com (Pierre Joye) On Mon, Feb 23, 2015 at 2:53 PM, Zeev Suraski wrote: > Thanks for testing, but it's a bit premature to jump to conclusions. > > First, disabling phar is in the patch instructions at > github.com/php/php-src/pull/1110 - it's a bug in phar that needs to be > fixed. We'll address it. > > Secondly, as was obvious both from Francois' email and mine, this is just an > initial patch, and yes, we know it presently fails 8% of the test cases (as > I stated a few hours ago in an email to Benjamin). I still think it's not a > bad start at all; It would be a pretty bad ending, but I think we can tweak > the rules to get a lot less breakage. If you're up for it, you can > experiment with the many the 12 configuration switches that govern this > patch - but even that is a bit premature. Let people who actually want this > RFC to pass try and tweak the patch first :) I understand it is a initial patch. However I totally fail to see how changing the casting rules by default is doing us and our users anything good. Yes, they are inconsistent, nobody can remember or even know all of them or edge cases. But after a decade or more, most of them (rare "magic" edge cases are partially covered already) are part of what a huge amount of codes rely on. As Benjamin pointed out, most of these codes are not tested. And for the parts being tested, I can say that it is nearly impossible to extrapolate the impact of such change in user land. It is not a lack of desire to do so but the very large and difficult surface we have to cover. I will be against any change in this area not related to extreme edge cases, if done by default without any possibility to disable the new casting behaviors. I consider as a expected disaster in order of magnitude bigger than what we see in python 2>3. > Thirdly, as I shared earlier, the RFC was updated to go for E_DEPRECATED in > PHP 7, which means there would be zero breakage in PHP 7, and ample time for > people to migrate whatever issues this would introduce to their code until > PHP 8. All functionality changes will go through the E_DEPRECATED cycle, > exactly like the stuff that got removed in PHP 7. Well, E_DEPRECATED as it is now has no meaning. But why not. That being said, again, I do not see how changing casting rules won't introduce BC breaks. Please enlighten me. > Last, we don't yet have an answer to your question about the billions of > lines of code out there. But as I told to Benjamin, we have every intention > to try the patch out on some real world apps and see how it performs. Patch applications to test something that does not break BC? I understand the need of testing a new feature and we do similar things for strict typing interacting with legacy code, but one must do test case is legacy codes remaining untouched to actually see the impact, with or without new addition of modules or codes relying on a new mode. > Let me assure you that if we find that there are hundreds of issues trying > to get common apps to work, after we tweak the rules - I'll either retract > the RFC or the very least rethink the internal functions part of it. The common apps are a very but loud part of the PHP codes out there. I worry about these parts more than about Wordpress, for example.