Re: [RFC] \PHP namespace usage heuristics
| From: | Stephen Reay | Date: | Wed, 08 Jul 2020 05:08:52 +0000 |
| Subject: | Re: [RFC] \PHP namespace usage heuristics | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110873@lists.php.net to get a copy of this message | ||
> On 8 Jul 2020, at 05:11, Larry Garfield <larry@garfieldtech.com> wrote:
>
> On Tue, Jul 7, 2020, at 4:22 PM, Miguel Rosales wrote:
>> Larry Garfield wrote on 07/07/2020 16:46:
>>> This has reached the 2 week mark, but there's not been much discussion. Anyone
>>> else want to weigh in?
>>>
>>
>> I guess I'm missing something obvious here, but the RFC says:
>>
>>> 5. Component or sub-component namespaces MUST use CamelCase naming
>> conventions.
>>
>> But then in the examples you've got e.g. \PHP\DOM\ or \PHP\SPL\... isn't
>> that incorrect?
>>
>> And slightly related, is there any reason to use \PHP instead of \Php?
>>
>> Sorry if this has been discussed before, I haven't seen it.
>>
>> Cheers,
>> Miguel
>
> Mm, mainly because I added the CamelCase clause late and didn't think about abbreviations.
> Whether it should be PHP/XML/DOM or Php/Xml/Dom has been an ongoing debate for at least since PHP
> 5.0. I have no preference strong enough to die on that hill, though, so whatever voters are willing
> to go for I'm good with.
>
> Anyone care enough to offer a bikeshed color?
>
> --Larry Garfield
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
Hi Larry,
IMO (and I know it’s not universal) acronyms should remain upper case. Camel case is about upper
casing the first letter of each word. The letters of an acronym are all the first letters of words,
thus DOM not Dom, etc.
Cheers
Stephen