Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119323 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81364 invoked from network); 18 Jan 2023 17:06:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Jan 2023 17:06:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CB82C1804A9 for ; Wed, 18 Jan 2023 09:06:29 -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=-0.2 required=5.0 tests=BAYES_40,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-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 ; Wed, 18 Jan 2023 09:06:29 -0800 (PST) Received: by mail-wm1-f44.google.com with SMTP id l41-20020a05600c1d2900b003daf986faaeso2056604wms.3 for ; Wed, 18 Jan 2023 09:06:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=fq/6R/QETiRANBLO8xVCSTb+0KQzLsSJDWoVeeWsk0U=; b=eVETInIOX0rorho7QV9MheVEse9ykPg5uo46EShezEBx0J7h7TieMcAE0lSXTk9xQX rM02QfH7vTepMWO70Nfuu/Za5PKTIkJZ9qHa41YgPlJ757m1tL0wM5tVEHevFIQ+EBRr yEu1a62zXejt8XO6OixxRTwFRhfh89ZPCUHh/2Dec2fkYfro0YwNmqmDdWAyAvCvFc6k 2DEFCUqdAQvBkmJQFuwSZUv7bg+zO3FJdv2bJ/IkR1Dvqqp+M5W4agrVeSxw41ZX18+U t0JjZoFf0v/y71OdIqP/hv9nVf0vJRNu8ZfNxN3UB34D6MrLw3/T8H5GcdIacw+aY1EN nMTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fq/6R/QETiRANBLO8xVCSTb+0KQzLsSJDWoVeeWsk0U=; b=uhYBb10BGCc7HwmJq5MNyUWKClQqk6CUpgtG0MRGY5gtqpmCIIdb46/ke5XcN1vv8N 7iJiAwnnpFdLQgEG1PWTyhTRNAqnTnCL9h/W6HBsIORqxBnkdJhDdJ2nzBpz7n2/B30G ryevN3fIETECQrmek2pu4K++SG4QXfcmjlwL7fp2SOv9QJQNIn3zME9q1VGve2MRRlPm Scc9UFfkPJ1fwa2NRBng9QcUqYLm95RytdYJOt5q4lNSBv01r1ktAgvJeY3dasJBeVNR gaIGapJzO6ZhEra7FHg/c86K5wy1GHxWvmRKM3YQfZdWm+pB2xO1du0YQ0sOzfvv9u8c iQQA== X-Gm-Message-State: AFqh2kowiqPA3rVy97DueSA4xj//sSx27veldYTQabmapx2O53vhXtPa HgrZpGdEy2VJmro7DiErYTfLkSfmY8E= X-Google-Smtp-Source: AMrXdXs5JYtV2lF6525D893fm/NjwK6ZjzXyjbd5gxrU+0i6r20qnyo+f0ciR83Gz3wN7uA7OTzuNw== X-Received: by 2002:a05:600c:224b:b0:3d2:640:c4e5 with SMTP id a11-20020a05600c224b00b003d20640c4e5mr7396538wmm.8.1674061588164; Wed, 18 Jan 2023 09:06:28 -0800 (PST) Received: from [127.0.0.1] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.gmail.com with ESMTPSA id be12-20020a05600c1e8c00b003db06224953sm2959982wmb.41.2023.01.18.09.06.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Jan 2023 09:06:27 -0800 (PST) Date: Wed, 18 Jan 2023 17:06:26 +0000 To: internals@lists.php.net User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <8DA390C5-5E67-4847-A89F-1A8CCC6C5389@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----1FJU0L4DTRCB3RZK8ZNOTVQFNC45R4 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: rules for #include directives From: rowan.collins@gmail.com (Rowan Tommins) ------1FJU0L4DTRCB3RZK8ZNOTVQFNC45R4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Regards, On 18 January 2023 16:07:52 GMT, Max Kellermann wrote= : >This argument puzzles me most=2E I've never heard anybody criticize >some piece of code for having too MANY code comments, too MUCH >explanation=2E Then I guess you've never heard people quoting Robert "Uncle Bob" Martin, = who is well known for asserting that code should be self-documenting, and t= herefore not need comments, saying things like: > The proper use of comments is to compensate for our failure to express o= urself in code=2E Note that I used the word failure=2E I meant it=2E Commen= ts are always failures=2E Many arguments could be had over whether that's going too far, but "too ma= ny comments" can definitely be a bad thing=2E To take the example Dmitry gave: > #include "zend_portability=2Eh" // for BEGIN_EXTERN_C What should I understand from this comment? - If I want some other symbol defined in zend_portability=2Eh, do I need t= o adjust the includes? No, all the symbols are already imported=2E I could = adjust the comment, but nothing will break if I don't=2E - If I remove the last use of BEGIN_EXTERN_C in this file, can I remove th= e include? No, because other symbols from it might be used, even if they we= ren't when the comment was written=2E So why does this comment feel necessary? - Perhaps the name of the header doesn't give a clear enough idea of what = symbols it might contain, and what types of file should include it=2E If so= , concentrate on better naming, or better documentation of existing convent= ions=2E - Perhaps it is a justification added when the include was first added=2E = If so, put it in the commit message and PR summary=2E I'm not the right person to have opinions on the rest of this discussion, = but I can certainly understand the argument against this particular aspect= =2E --=20 Rowan Tommins [IMSoP] ------1FJU0L4DTRCB3RZK8ZNOTVQFNC45R4--