Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123159 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 709CC1ADA73 for ; Fri, 19 Apr 2024 19:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1713553859; bh=dyhQGLchTHgxMM9N0S/S9FG4E287YuW7983I+S8opGU=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Bc4Qzw4gxsxyE8FhjDpMuoaKSvA60EqoyywRnhotC9JOpVwuv4l0NgFgac45ipqDB wIB4sw8gbwSIy7ZeWUqOHhw23iICUklqv9Rf1M/k9ZoYtbJj7ho071Tvt4qlrNqNBH n1uRJOwYIJk5x4naZE/+s8uKH1GCsc4jmX2h2f95oJIB1BgR2BKQr/jLT2rPT8png/ 4QkYmb8nVHafB8wKJhx0t/8LNS3bjrU3Aa9CuNNbqF4BtuXZ4lR/E6kof9Ip/lxx3W lJYJw03NOF7nl9eSmtW805b2IlE9FZsneg09uD7Ef/NTjVtw+V3mcev626WHBr7nw6 eK0SuHotm714g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0D6B11801E1 for ; Fri, 19 Apr 2024 19:10:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-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,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 19 Apr 2024 19:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1713553814; bh=IufW6ziQcR0o1dtk85x5RjtlXcFoWWv7aS1ieOnuv4A=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=ch+Y4LjsQGjCOihX3RbMDszuXBmnrhsQWJn+xRuJTPslZXoruDiAQXqWDl8ABJ04z qSJToOdjuXEkXDe6xcBnmh3/XUrWafak/L49qSJ5GLHHrsGYP2V2Oq1ThUvTIZ8zPd yEKfnsj5ojNv5g1C/Ht9mPvyX9ab52SbgRyZM2e4PJ5KJ2ixSKMg2M7+cepQAY9il4 HtT3wDrQoqvfvR6UIGqTmKtSeX6ou1IIs7YlB8XeJxIRuyZIrLkVtUWoETr5/axxhA grNX3Izwhm84KO4uXWYa4pvFJXWVEmo5fAn1Dje1hkB562qqA4/hr2DKrp1Z1SxuB2 omyFsayRCiZFA== Message-ID: <91f7e39b-ff2e-471e-86c9-b18e4492fb72@bastelstu.be> Date: Fri, 19 Apr 2024 21:10:14 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] Casing of acronyms in class and method names To: Bilge , internals@lists.php.net References: <792b2282-b7a3-40dd-899c-daab55353316@bastelstu.be> <08200b2f-55ca-4e8f-aeb3-d5b07bf3ae3c@scriptfusion.com> Content-Language: en-US In-Reply-To: <08200b2f-55ca-4e8f-aeb3-d5b07bf3ae3c@scriptfusion.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 4/19/24 20:47, Bilge wrote: > Not that my opinion counts for much, but I have to say I find this very odd. > > Good class names: > Id // Identifier > ID // Identity Document > > I understand the distinction you wish to make here, between an acronym > and abbreviation, but I think it's a meaningless distinction. In this > case, `Id` would be fine for "identifier", but "Identity Document" > should simply be `IdentityDocument`. Whilst the distinction may seem > meaningful to you, it certainly does not look that way to me; I think it > would be difficult to remember and explain to someone else. Perhaps the > tie breaker could be that it wouldn't be meaningful to an automated > style checker, either. That is, it would be difficult to enforce this > policy exception in any automated way. Why not just keep it simple and > consistent here, disallowing runs of multiple upper-case letters? I have copied the example identifiers verbatim from the existing phrasing in CODING_STANDARDS.md and just moved them into the correct section according to the updated wording. However 'ID' as-in 'Identity Document' should also be 'Id' with the updated policy, which I missed. Or rather it should not be abbreviated at all. I've adjusted the examples [1], thank you for pointing this out! Best regards Tim Düsterhus [1] https://wiki.php.net/rfc/class-naming-acronyms?do=diff&rev2%5B0%5D=1712419286&rev2%5B1%5D=1713553737&difftype=sidebyside