Acronyms in class names (was: [RFC] [Under Discussion] Random Extension Improvement)

From: Date: Mon, 20 Jun 2022 15:22:52 +0000
Subject: Acronyms in class names (was: [RFC] [Under Discussion] Random Extension Improvement)
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-118015@lists.php.net to get a copy of this message
Hi On 6/20/22 16:36, Lynn wrote:
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 ever 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.
Yes, I agree here. I switched to ucfirst(strtolower()) acronyms a while ago and find those much more readable. It also avoids issues when there are multiple acronyms within a single identifier (think PCGRNG vs PcgRng). Best regards Tim Düsterhus

« previous php.internals (#118015) next »