Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119522 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28687 invoked from network); 12 Feb 2023 08:31:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Feb 2023 08:31:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F36F21804BE for ; Sun, 12 Feb 2023 00:31:31 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 138.201.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from swift.blarg.de (swift.blarg.de [138.201.185.127]) by php-smtp4.php.net (Postfix) with ESMTP for ; Sun, 12 Feb 2023 00:31:31 -0800 (PST) Received: from swift.blarg.de (swift.blarg.de [IPv6:2a01:4f8:c17:52a8::2]) (Authenticated sender: max) by swift.blarg.de (Postfix) with ESMTPSA id B9A9440E35; Sun, 12 Feb 2023 09:31:29 +0100 (CET) Date: Sun, 12 Feb 2023 09:31:28 +0100 To: Peter Kokot Cc: internals@lists.php.net Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [PHP-DEV] [VOTE] include cleanup From: max+php@blarg.de (Max Kellermann) On 2023/02/11 17:14, Peter Kokot wrote: > I've voted in favor of the RFC because of the code-cleaning, > tech-debt-reducing improvements to code readability. Exactly my point, and I'm surprised by the resistance. Not only surprised, but also disappointed that many have voted against code cleanup, but where have those people been when this was being discussed? Matthew said there had been "chatter from a number of folks after the changes were merged about builds no longer compiling", but was not able to render that more precisely. None of that was discussed on GitHub nor here on php-internals. I have to question whether these build breakages even exist. (Other than the DTrace build failure which happened because one line was missing, but that's a fact and not "chatter", and one bug reporter and not "a number of folks". Let's put this dead horse to rest.) > BTW, merging from PHP 8.1 up is not problematic. Git diff only looks > at a few lines of code above and below. Not the top of the file. This was the only counter-argument ever discussed here, and I'm puzzled that the imagination of merge conflicts scares so many people. About a kind of change that is unlikely to cause one. Any code change can cause a merge conflict, but include cleanups are the least likely cause of all, because include directives are almost never touched in bugfix-only branches. Is that all, or is there another, yet unnamed reason why there's so much resistance? The hearsay about build failures? There are 3 more days to vote, and it's a tie currently - means 9 "YES" votes missing for supermajority or else the RFC gets rejected. That rejection would not only be a missed chance to modernize the PHP code base, but also a sign to potential PHP contributors that the PHP maintainers don't value clean code. This is unsettling. Imagine how this will overshadow future attempts to remove historical cruft from a decades-old code base, because the counter-arguments apply the same to any kind of code cleanup. As any decades-old code base, there's a lot of historical cruft in PHP which gets in the way all the time, much more than a hypothetical one-time merge conflict. Historical cruft keeps piling up if you don't keep cutting it down all the time. Cleaner code is easier to read and understand, which makes existing bugs easier to fix and makes new bugs less likely to be added. That outweighs, in my opinion, all the possible disadvantages that the process of code cleanup could possibly have, by orders of magnitude. Max