On Thu, 25 Feb 2021 at 20:26, Nikita Popov <nikita....@gmail.com> wrote:

> Hi internals,
>
> The question of namespaces in the stdlib has been coming up a lot recently,
> so I'd like to present my own stab at resolving this question:
>
> https://wiki.php.net/rfc/namespaces_in_bundled_extensions
>
> Relative to a number of previous (declined) proposals, the main difference
> is that I do not propose a top-level "PHP\" vendor namespace, and instead
> recommend the use of "ExtName\", in line with existing practice for
> extensions. I believe this addresses the primary concern with previous
> proposals.
>
> Regards,
> Nikita
>

As one of the co-authors of one of the previously declined RFCs [1] and
author of the CSV extension, [2] where I changed from using prefixed
functions to a global class called CSV in the same fashion as FFI,
I quite like this proposal, and have no issue changing it to conform to
the RFC.

This sidesteps the issue of the PHP namespace in a very elegant way
by not creating a weird dichotomy for "core" (core/standard/SPL) functions,
if some of them start using namespaces as they'll only be one level deep
and the name is relevant to the functionality they provide.

Best regards,

George P. Banyard

[1] https://wiki.php.net/rfc/php-namespace-in-core
[2]
https://gitlab.com/Girgias/csv-php-extension/-/commit/dc48b449543b07eaeff575bd143350693f808d74

Reply via email to