Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118032 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96134 invoked from network); 21 Jun 2022 07:33:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Jun 2022 07:33:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 570241804D0 for ; Tue, 21 Jun 2022 02:22:49 -0700 (PDT) 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, 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-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) (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 ; Tue, 21 Jun 2022 02:22:48 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id p69so11749105ybc.5 for ; Tue, 21 Jun 2022 02:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=BJ+aFez0xsteddxFO/AAVu0xB1NHzjik74l+CFveirk=; b=cHRXYHr4zWPEZZlb6y/AXb935lgKEksu2mrjtXYTS1VUmBSW9diTzBrRFe1sDA1lQq qRFQ9PDdWk7b/GeykhdkD68cNLHTtyrOAfOTxnVu1BiFLU3xbAgQKkHeGOGVBVTQkyYH DqWyIjqaR2LfbQPx4Mcqqlaw5II6P8swsMWQF//tLstazr9qoPYk05egWKV9/v+DSgeP 5QQiLO64G2Z9gC7vejBwZ+8dYzFagfOA7Q/g/F8owq+xJ7BTkKaCvOjjyObGecKui3qf rZDCA5S/wTOO8VoJ7OrAEvtWmCtjXfstxNFkqvuahZtJgUQPMUz+QY0ADaNwd6sScT60 ExQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=BJ+aFez0xsteddxFO/AAVu0xB1NHzjik74l+CFveirk=; b=MRZ855avMxKDqYIwjtIztL+RcKpRV3knQJf0ejseFASJZfErZ0j61jfKLdsauDuVCm YfljpSNzke0QDPcuUg2K6pBFHQ+1lnZMhUQkUevP3HwrUdiTQ170p0exjNFb9pUM0Gwd auPdPRdBDHuYVN5QWyW11p/4Jr59MvSZMkBEjp40Y9H7+VZHe9F4+w69jg4FUTPSfzUd UqLala7tnIME9btqOlb0IdkNAkju5IJRdf+PSTVnh/5W9jxVHw+XgZvYqJY+5SeZ0buw JqneGTLDiqQkmAuLty7t4uTwK6yI1PFDBmWbxizLRmAc1SK7u3WTGVIgr+gTjmV/38SH EogQ== X-Gm-Message-State: AJIora+m4gnYY3IBp347JXLRZuULpjBJIcx5QF/3Ad76yg8kbzn7DZJd CAr3lG9MRdSWln3zYIP5T2HpmUDo6U/mjT7hyQ== X-Google-Smtp-Source: AGRyM1vbrVLl1xnQJO2GDzfppJkmm+3vQfqUs5boz2+NQ5CNRUaX1TYUDy6hYxNvrpfpoFhAuLWutHwDILvPY07lvtY= X-Received: by 2002:a25:8682:0:b0:669:12e1:d7e7 with SMTP id z2-20020a258682000000b0066912e1d7e7mr10566912ybk.9.1655803368316; Tue, 21 Jun 2022 02:22:48 -0700 (PDT) MIME-Version: 1.0 References: <376a90af-8709-012c-76ee-fa351d1b017c@gmx.de> In-Reply-To: <376a90af-8709-012c-76ee-fa351d1b017c@gmx.de> Date: Tue, 21 Jun 2022 11:22:35 +0200 Message-ID: To: "Christoph M. Becker" Cc: Go Kudo , Lynn , PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [Under Discussion] Random Extension Improvement From: guilliam.xavier@gmail.com (Guilliam Xavier) On Mon, Jun 20, 2022 at 5:25 PM Christoph M. Becker wro= te: > > On 20.06.2022 at 16:44, Go Kudo wrote: > > > 2022=E5=B9=B46=E6=9C=8820=E6=97=A5(=E6=9C=88) 23:37 Lynn : > > > >> On Mon, Jun 20, 2022 at 3:15 PM Guilliam Xavier >> wrote: > >> > >>>> https://wiki.php.net/rfc/random_extension_improvement > >>> > >>> Thanks, but I am not sure about your argument in "Classnames are not > >>> canonicalized": does "PHP applies strict PascalCase to class names" > >>> (which remains to be proved) really imply to rename *acronyms* (e.g. > >>> "CombinedLCG" to "CombinedLcg")? especially given existing classes > >>> like "SimpleXMLElement" (not "SimpleXmlElement"), and that the > >>> accepted "Class Naming" RFC (https://wiki.php.net/rfc/class-naming) > >>> voted for "PascalCase except Acronyms" (not "Always PascalCase") -- > >>> excerpts: > >> > >> Not specifically directed at this discussion, but perhaps this needs a > >> revision. HTTPStatus is much harder to read for me than HttpStatus and= it's > >> unclear where the boundary of an acronym starts or stops. If anyone ev= er > >> decides to make an RFC for this, you have my vote. These Acronyms are > >> treated as words and thus should follow the same naming convention. If= they > >> shouldn't be treated as words, write their full name: > >> HypertextTransferProtocolStatus. > > > > I support "PascalCase except Acronyms" for readability, but would like = to > > see this > > clarified as I get very lost when implementing new features. > > I think it is necessary because I expect various OO APIs will be added = in > > the future, > > like cURL. > > In my opinion, was a bit > unfortunate. It may have been better to decide on a case by case basis. > > For instance, we have introduced several Curl* classes in PHP 8.0[1], > and these adhere to the appropriate example in the RFC, although CURL is > clearly an acronym[2], and the canonical spelling is even cURL. Maybe > even worse, the previously introduced CURLFile[3] uses different > capitalization, and CURLStringFile[4] which was introduced in PHP 8.1 is > aligned to that spelling. > > So, obviously, the RFC didn't have a good impact on some of the namings > so far. That seems unfortunate indeed :/ and there are others, e.g. "XMLReader" but "XmlParser"... Moreover, I see that https://github.com/php/php-src/blob/master/CODING_STANDARDS.md#user-functio= nsmethods-naming-conventions item 7 only says "should", not "must". I too find "HttpStatus" [or "HTTP_status", for that matter] more readable than "HTTPStatus" (where I first see "HTTPS" before noticing that the S actually starts a second word), and "PcgOneseq128XslRr64" than "PCGOneseq128XSLRR64" (especially if not already familiar with "PCG" and "XSL-RR")... So, it may indeed be OK (and preferred?) to "canonicalize" the proposed class names (just, "PHP applies strict PascalCase to class names" wasn't a good argument for it). PS @Go Kudo: please don't be offended, but in general, maybe you should wait "a bit more" [or even ask] for other opinions, rather than changing the RFC "too fast" after only one (especially when I said "I am not sure" and asked a question) Regards, --=20 Guilliam Xavier