Mixed-Case Class Names (was Re: [PEAR-DEV] [PEPr] +1 for Payment::Payment_PayPalSoap)
| From: | Paul M Jones | Date: | Thu, 21 Aug 2008 21:11:54 +0000 |
| Subject: | Mixed-Case Class Names (was Re: [PEAR-DEV] [PEPr] +1 for Payment::Payment_PayPalSoap) | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50603@lists.php.net to get a copy of this message | ||
On Aug 21, 2008, at 10:13 , Joe Stump wrote:
On Aug 21, 2008, at 6:41 AM, Michael Gauthier wrote:For what it's worth, I'd suggest using only-first-letter-caps. Makes it easier to transform between formats (all-lower-case, all-upper-case, and dash/space/underscore separated) programmatically. E.g., "Pear_Http_Request" is easy to convert to "pear-http-request", and then back to "Pear_Http_Request", using only strtolower(), str_replace(), and ucwords(). "Pear_HTTP_Request" is harder, because you have to know in advance that the middle part is all-caps. How often would you do have to do that? Don't know, just speculating. (Do it in Solar all the time though, and it makes things a lot easier.) Just my two bits, disregard at will. :-) -- Paul M. Jones http://paul-m-jones.com/Is there an official PEAR stance on this? Though I prefer Soap over SOAP, I'm fine changing the package from Payment_PayPal_Soap to Payment_PayPal_SOAP if that is what PEAR requires.I can't find a single "official" stance per se, but there's plenty of precedence. I couldn't find a single package with an acronym in the name that didn't have said acronym properly capitalized. I'll make a note to bring this up at the next PEAR meeting so we can clarify the documentation one way or another.