Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119528 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52087 invoked from network); 12 Feb 2023 14:49:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Feb 2023 14:49:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4C89818053F for ; Sun, 12 Feb 2023 06:49:27 -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.1 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NEUTRAL, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS16276 46.105.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from 2.mo584.mail-out.ovh.net (2.mo584.mail-out.ovh.net [46.105.72.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 12 Feb 2023 06:49:26 -0800 (PST) Received: from director6.ghost.mail-out.ovh.net (unknown [10.109.146.131]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 592DF23803 for ; Sun, 12 Feb 2023 14:49:25 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-xvx76 (unknown [10.110.115.151]) by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id CEE051FD17 for ; Sun, 12 Feb 2023 14:49:24 +0000 (UTC) Received: from php.earth ([37.59.142.95]) by ghost-submission-6684bf9d7b-xvx76 with ESMTPSA id cQv9JXT86GMsxgEAG3L3pw (envelope-from ) for ; Sun, 12 Feb 2023 14:49:24 +0000 Authentication-Results:garm.ovh; auth=pass (GARM-95G0011bb7c4ba-11d1-4b6d-be11-14ab191de7ff, F23E9394B0C1ABBE3494B787A98FB99A9335C58D) smtp.auth=peter.kokot@php.earth X-OVh-ClientIp:209.85.210.179 Received: by mail-pf1-f179.google.com with SMTP id j184so1474096pfg.10 for ; Sun, 12 Feb 2023 06:49:24 -0800 (PST) X-Gm-Message-State: AO0yUKVUyXpDT4/kdxkfdpiA0Wt8ZCB/R9o4Zd5AtuoxQoq/wm34QOGN 6dKSTKM0MU6+YjxffobD/cZk7Tpfi1FMwNyrEVc= X-Google-Smtp-Source: AK7set+S5oLIpjHM5DeFILW4qFLPGizWdQJWF6TNEbm9tb7TnDsUTkeZr/FW6h9XkXf1T598G4gRvBYxfZWfqnpSfm0= X-Received: by 2002:a63:294e:0:b0:4fb:4612:95fe with SMTP id bu14-20020a63294e000000b004fb461295femr2342126pgb.6.1676213361150; Sun, 12 Feb 2023 06:49:21 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 12 Feb 2023 15:49:09 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Max Kellermann Cc: Peter Kokot , internals@lists.php.net Content-Type: text/plain; charset="UTF-8" X-Ovh-Tracer-Id: 18191446273648812550 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudehledgieelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpeggfhgjhfffkffuvfevtgesthdtredttddtjeenucfhrhhomheprfgvthgvrhcumfhokhhothcuoehpvghtkhesphhhphdrnhgvtheqnecuggftrfgrthhtvghrnhephfeghfeffffgvdehleduveekfedtgfetjeevgeevueegvddtgeekuefftdeufefhnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrdelheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehpvghtkhesphhhphdrnhgvtheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvthdpoffvtefjohhsthepmhhoheekgedpmhhouggvpehsmhhtphhouhht Subject: Re: [PHP-DEV] [VOTE] include cleanup From: petk@php.net (Peter Kokot) On Sun, 12 Feb 2023 at 09:31, Max Kellermann wrote: > > 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 Well, the PHP long-term maintainers are just a bit stubborn when it comes to such changes and probably what concerns them is writing code styles in stone. We shouldn't conclude that the PHP team as a whole doesn't care about clean code based on this voting. People just need a bit of time to grasp the changes and discuss these things over a longer period. They just care more about the stability of the current repo and the extensions out there than the cosmetics of the ASCII characters in files. I agree though, that both sides need to be improved. One more question here. Is the iwyu (include-what-you-use) tool used here to clean up these header files? I'm assuming something like this could be one day executed: iwyu --no_fwd_decls --no-comments Based on this, this is an awesome tool and can improve the code. I'd say to go hand in hand here and one day later discuss things like this again to integrate these gradually. Automating is always tricky on the other hand. Like adding the iwyu step in the build checks.