Re: [RFC] Casing of acronyms in class and method names

From: Date: Sat, 06 Apr 2024 16:01:55 +0000
Subject: Re: [RFC] Casing of acronyms in class and method names
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi

On 4/6/24 17:54, Saki Takamachi wrote:
However, in the example from "RFC: Namespaces in bundled PHP extensions", the acronyms are not camelcased. e.g. FFI\FFI, OpenSSL In other words, the RFC can be interpreted as "excluding acronyms" implicitly.
This is correct, because the current class naming policy specifies that acronyms must be written in UPPERCASE. Thus the examples are consistent with the current policy.
Just to clarify: I agree with your RFC. However, I think it is best to avoid vague statements where the meaning changes depending on interpretation, if possible.
I've added namespaced examples: https://wiki.php.net/rfc/class-naming-acronyms?do=diff&rev2%5B0%5D=1712350524&rev2%5B1%5D=1712419286&difftype=sidebyside
In fact, due to some ambiguity in the namespace RFC, I couldn't decide whether BCMath's namespace should be "BcMath" or "BCMath”.
With the current policy it should be "BCMath", if my RFC passes it should be "BcMath". I think Bcmath would be fine as well, if you consider the extension name to be a single word. Best regards Tim Düsterhus

Thread (24 messages)

« previous php.internals (#123003) next »