Re: [RFC] \PHP namespace usage heuristics
| From: | Stephen Reay | Date: | Wed, 08 Jul 2020 06:23:02 +0000 |
| Subject: | Re: [RFC] \PHP namespace usage heuristics | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110875@lists.php.net to get a copy of this message | ||
> On 8 Jul 2020, at 13:16, Michał Marcin Brzuchalski <michal.brzuchalski@gmail.com> wrote:
>
> Hi Stephen,
>
> śr., 8 lip 2020 o 07:09 Stephen Reay <php-lists@koalephant.com> napisał(a):
>
>> ...
>> 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.
>>
>
> It doesn't really matter much though, since core symbols are already known
> on runtime so symbol resolution works by case insensitive manner.
> So it's only a matter of preference on documentation side.
>
> namespace Foo\Bar {
> class BaZ {}
> }
> namespace {
> var_dump(new foo\bar\baz());
> }
>
> Cheers,
> --
> Michał Marcin Brzuchalski
Hi Michal,
I realise that - I was replying to a specific question about bike shedding the capitalisation - that
it works in other cases is irrelevant IMO.
Cheers
Stephen