Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119282 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69457 invoked from network); 16 Jan 2023 16:14:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Jan 2023 16:14:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1B4811804B4 for ; Mon, 16 Jan 2023 08:14:57 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (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 ; Mon, 16 Jan 2023 08:14:53 -0800 (PST) Received: by mail-lf1-f51.google.com with SMTP id x40so9314277lfu.12 for ; Mon, 16 Jan 2023 08:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ldEO+ZSlE6ZDmpwVVAqV/pR2qr3gveWffBARf2B/ti8=; b=nMwi/e8hiYuIWxV9ZQqOzjQj1RnLxO6bnA2JgwVtW2TdDYgbcb6csZ++4MDyU9/HXe m32z9oDILRt+wE8NtUOPwZIBfb0X9ehkUSe4bIoGgtJ/WWPQzrN5zZ6okHAOdwjulY91 /21NyT8x8NlQbXd10EXy+r+4rEp0W2Hu501tyQ0fMXgmLzr5QwUIBqqklrRidgNRxsL8 SVlsMfkd2IbIDzeB66l9d/bB7A+z4DqKnVsL3L965Irf2XWpLwUS9jKqZwiZ+stdhJff RIsKNgd4oyqcNICbMZuG6w5NC52xpizkEEftXBcUnh2xlDoDS3yRK/Gyft2pj/aVY8x+ j49w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ldEO+ZSlE6ZDmpwVVAqV/pR2qr3gveWffBARf2B/ti8=; b=KhML6YzvUV8ZA2IkyjrDz/zr8YHGPakbAe7hr9WLcCsp+P1zPVva6KDeVcJHtDh6lE Je7/Qdh8pcOUp7f4VzeyZbUlIjTOj8rpvOvL+hEJyjHoksWzfrVqWF6TGIEhc0ImEu1r AWWAYeSqZqL6XaFPCvX+6ffFnADaB+OXx4k83qEAmwf1JrMjFsjvc9zPrDjXut7cGseg 82+mlYGmFMYo0mx/WBFNAZCMAoH6tQBF2Bzn+JCfVzuc/Z2XP0kul0UdnaDYFbCNZBpD +cNWKqmBaLTVQ6ZGAA/bOUoSPmULXsrchCUcT5Y/WnUyvLjUIqll9UfeesJjuVwXXHwk eKMA== X-Gm-Message-State: AFqh2krZOBULCJmSDXUscmeUM5S9EcQ/IbEiPQIGIT2g1P4RbkhItMxW /P+uFVjctj0bIRdsv9yBSRhvrGfOCwX6KM1fmAo= X-Google-Smtp-Source: AMrXdXtM5p78IjCiE5ZIdw/bLX0dHucCvIPamL/jY+/5IYs2LPi2hrosC81jbtPe+b3N5t77RNifBEcsNRFcfkr/gGw= X-Received: by 2002:ac2:559b:0:b0:4c5:f1d2:79c0 with SMTP id v27-20020ac2559b000000b004c5f1d279c0mr5144690lfg.203.1673885691436; Mon, 16 Jan 2023 08:14:51 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 16 Jan 2023 11:14:39 -0500 Message-ID: To: Max Kellermann Cc: Kamil Tekiela , internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000008635a05f263e2b7" Subject: Re: [PHP-DEV] RFC: rules for #include directives From: chasepeeler@gmail.com (Chase Peeler) --00000000000008635a05f263e2b7 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 16, 2023 at 7:54 AM Max Kellermann wrote: > On 2023/01/16 13:38, Kamil Tekiela wrote: > > Did you create an RFC already? Or is this RFC-like discussion? > > No. I followed https://wiki.php.net/rfc/howto and this is step 1. > Creating the actual RFC is step 3. > > (I'm new to PHP and this process - so far, I've only contributed PHP > code through GitHub, and I was surprised by today's sudden resistance > against my code cleanup by two PHP developers, after the others > welcomed by changes.) > > > In either case, if you are asking community to come to a decision, we > need > > to see some background. > > > Why do you want to change this? What's the benefit? > > For cleaner code, more readable code (less obscurity in huge amounts > of undocumented #includes), more correct code, less fragile code, > reduced compile times. > > > What's the impact on other maintainers, especially extension > > maintainers? > > Other maintainers may need to determine which includes they really > need, instead of relying on everything always already there by > including one random zend_* header. > > Extension maintainers may see build failures because, for example, > they forgot to include errno.h but used "errno". This previously > worked because all PHP headers included errno.h even though there was > no reason to. These build failures are bugs in those extensions, and > revealing them is a good thing, even though it seems tedious at first. > > > Do you see any downsides to your new approach? > > Like any code cleanup, this can result in regressions for parts of PHP > that are not covered by a test and not built with the CI, like the > DTrace regression yesterday. > > And code cleanups can easily reveal existing bugs, which is a good > thing, but those bugs can be hidden at first - e.g. failure to > explicitly include "php_config.h" will (silently) disable features and > break things. That may cause some temporary pain, but in the end will > result in better code, though some will believe that it isn't a worthy > goal or not worth the temporary pain. > > Derick Rethans wrote my idea "adds nothing but clutter", but I guess > he should explain what bothers him; I don't comprehend this, because > from my perspective, I intend to remove clutter. > > Dmitry Stogov said it's "just a useless permutation", but I can't > understand this argument either. > > Max > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > For those of us that don't know the finer details of the build process, will that have any impact on the final product such as reduced binary sizes or better performance? I'm not saying that code cleanup isn't a good enough reason to do this on its own, just curious if there are other advantages beyond that. -- Chase Peeler chasepeeler@gmail.com --00000000000008635a05f263e2b7--