Re: [PHP-DEV] [RFC][DISCUSSION] PHP Namespace in core

This is only part of a thread. view whole thread
  109739
April 21, 2020 05:29 mike@newclarity.net (Mike Schinkel)
I have been wondering for a while why PHP does not officially recognize a \PHP namespace.

The inconsistency people have mentioned feels like a fair tradeoff for allowing new core classes to be cleanly-named and easier to understand.

And a \PHP namespace would allow RFCs to never need worry about conflicting with userland class names again.  

The one thing I would ask the authors: 

- Why limit it to "tightly coupled to the PHP engine?" 
- Why not just say "any new core classes that are approved to use it?"

After all, sometimes a namespace is just a namespace. Seems like a winner to me.

-Mike
  109740
April 21, 2020 07:19 michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=)
Hi Mike

wt., 21 kwi 2020 o 07:29 Mike Schinkel <mike@newclarity.net> napisał(a):

> I have been wondering for a while why PHP does not officially recognize a > \PHP namespace. > > The inconsistency people have mentioned feels like a fair tradeoff for > allowing new core classes to be cleanly-named and easier to understand. > > And a \PHP namespace would allow RFCs to never need worry about > conflicting with userland class names again. > > The one thing I would ask the authors: > > - Why limit it to "tightly coupled to the PHP engine?" > - Why not just say "any new core classes that are approved to use it?"
In the past, there were some proposals which treated about core namespace proposing to include most of the core symbols in a structured way. These proposals always failed for some reason. This proposal tries to convince internals to use PHP namespace in the core for tightly coupled to the PHP engine types which could be placed there without a risk to be unbundled in a future what would cause a need to rename them back. Therefore we think that these along with the arguments in the proposal are the best ones to agree for now. BR, Michał Brzuchalski