On 15/04/2020 12:23, Derick Rethans wrote:
This will mean that in a future version of PHP, some things will live in
a \PHP namespace, and others, such as DateTimeImmutable or Directory do
not. We should not be introducing inconsistencies.

It notes that it should be the preferred method for new feature development, and intentionally stops short of requiring it, to provide plenty of room for leeway in cases like this where there is an obvious benefit to keeping features aligned.

> Which means new additions to PHP 8, such as a potential PhpAttribute,
> now would have been \PHP\Engine\Attribute, while we already have
> PhpToken. That is another inconsistency that we don't need.

I would argue that both these two great new features would benefit from an additional level, unless of course we can guarentee that we would never introduce anything else into PHP called token, or attribute, at which point we are back to square one, a problem which can be almost all together avoided by adding a "feature" specific namespace under \PHP.

--
Mark Randall
marand...@php.net

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

Reply via email to