On 22/05/2020 12:08, Nikita Popov wrote:
As such, I would suggest to introduce a common namespace for all attributes
provided by PHP. This means we'd have Attributes\Attribute,
Attributes\Deprecated, Attributes\Jit, Attributes\NoJit etc. (I'm also okay
with the PHP\Attributes\Deprecated variant, but that's a separate question).


One possible policy which came up in chat last night was that universal base classes (which tend to be few in number, and act almost as keywords) should be in the root namespace; but built-in implementations of those (at the same level as ones users could create) are prefixed with "PHP\Something\".

For instance, if we had a time machine and were adding them all now:

- "\Throwable" and "\Exception", but "\PHP\Exceptions\RuntimeException"
- "\Iterator" but "\PHP\Iterators\FilterIterator"
- "\Attribute", but "\PHP\Attributes\Deprecated"

Regards,

--
Rowan Tommins (né Collins)
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to