Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106785 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 91013 invoked from network); 29 Aug 2019 08:08:39 -0000 Received: from unknown (HELO tbjjbihbhebb.turbo-smtp.net) (199.187.174.11) by pb1.pair.com with SMTP; 29 Aug 2019 08:08:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.net; s=turbo-smtp; x=1567662058; h=DomainKey-Signature:Received: Received:MIME-Version:References:In-Reply-To:From:Date: Message-ID:Subject:To:Cc:Content-Type; bh=TbIi4O4bWHCpWJw//a/5DE 31J8VRApfdGdJfM2XUufI=; b=uyodSaxEByhk5MgU1IihN+nk9UXkWic+ltjBTc cZ0UAdwOhT6YasZ4jRY7CBk4j0wg2wtsuFAer29bO6HINTdsEhhgGsrRHLqW+HDe BJ7hIgounApnvy2qdYW70gRFfV2+far9sZLZu+8Lro+SyDfRnlNbRryR/e3bIcET O2sbw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=turbo-smtp; d=php.net; h=Received:Received:X-TurboSMTP-Tracking:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version:References:In-Reply-To:From:Date:X-Gmail-Original-Message-Id:Message-ID:Subject:To:Cc:Content-Type; b=XeayAzlDDGxXMRMFl1AUTRSDlC3ccARlz26S568efQawf+Lz/70ON4qrUPY1rU MdxiHRDqeyVFdwSuU49Oq5+frhCuwVKh33/Nlx5Z3sp7oerlm7MSYTWYIpbZB2vv b0YJNEGmDzuacdUCaJShcjuwqyCqeXt5EQMMSd2cujH5c=; Received: (qmail 18182 invoked from network); 29 Aug 2019 05:40:58 -0000 Received: X-TurboSMTP-Tracking: 5246505565 X-Gm-Message-State: APjAAAUwmS2f/98F3y/1C3b0jvloIF2QUBpyGw36yNexUZNYLY7wCgnU FNpMp6oZD94NuJqvQxwRsB8SSNsB0WbewkEj+Z0= X-Google-Smtp-Source: APXvYqyrw9ldu5RsDLPn7OtyOyWcFhVmhtVPyKErkMUwf/GehOZQkLLxp1wy8UMOfkvGOtBQoD6J9F/obaGBj1pnfuY= X-Received: by 2002:ae9:f203:: with SMTP id m3mr7642657qkg.264.1567057257870; Wed, 28 Aug 2019 22:40:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 29 Aug 2019 08:40:45 +0300 X-Gmail-Original-Message-Id: Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000032bfbc05913af318" Subject: Re: [PHP-DEV] Re: [RFC] Reclassifying engine warnings From: zeev@php.net (Zeev Suraski) --00000000000032bfbc05913af318 Content-Type: text/plain; charset="UTF-8" On Wed, Aug 28, 2019 at 10:26 PM Nikita Popov wrote: > On Wed, Aug 28, 2019 at 11:33 AM Nikita Popov > wrote: > > Reading this discussion has been disappointing and somewhat disillusioning. > I can understand and appreciate the concern for legacy code. But seeing the > use of undefined variables espoused as a legitimate programming style, that > just makes me sad. > Nikita, It's really awkward that anybody would be under the illusion that the way the language always behaved, consistently and well-documented pretty much from the its inception, is somehow a bug that everybody agrees on that's just waiting for someone to come over and fix it. Do you really think that if there was widespread consensus that this wasn't a legitimate programming style, we'd have to wait for 20 years for folks to propose to change/remove it? This isn't short tags - this is fundamental language behavior, that indeed isn't even documented anywhere as a 'bad thing you must avoid'. There are commonly used code templates that rely on it, and do it in a way many would find perfectly reasonable. Many do, and always did consider it as a legitimate programming style. Many others do not - which is why we added capabilities ages ago (from the get go, for all practical purposes) that allow users to employ a much stricter programming style by enabling notices. We never, ever, at any point, considered this behavior to be 'legacy'. It's a language feature, that you can choose whether you want to use or not (and perhaps we can get better at that). The fact that PHP isn't supposed to be a strict language is repeatedly confused with exclusive concern for 'legacy code' as of late. Yes, the complete disregard for backwards compatibility that appears to be the most widely accepted POV on internals is disconcerting - but much more importantly - just because one doesn't like a certain fundamental part of the language, doesn't make the use of it 'legacy'. If anything, it perhaps means that said person who chose the language made the wrong choice (there are plenty of other choices to choose from), and they're now campaigning to change it to fit the image of what they think it *should be* that they have in mind. With that said - I think it does make sense to try and come up with ways to cater to those who prefer a stricter language, and in this particular case - something that's a bit more aggressive than notices. But if there's something sad about this, it's the insistence to always frame the discussion as a zero sum game - instead of trying to find solutions that cater to a wider audiences. It's time to accept that the composition of PHP users is a lot wider than what's represented on internals, and it's certainly not everyone's opinion that the current language is in dire need of being rescued. PHP can be improved for those who find it lacking, without harming those who are in fact happy with the way it currently is. We should start looking for such solutions, instead of each just trying to 'win for their own camp', putting things to a vote hoping to subjugate the other. Zeev --00000000000032bfbc05913af318--