Hi Marcio,

śr., 15 kwi 2020 o 18:39 Marcio Almada <marcio.w...@gmail.com> napisał(a):

> >
> > Hi internals,
> >
> > I hope you're doing well.
> >
> > I'd like to announce the PHP Namespace in core RFC for discussion.
> > The RFC is authored by me together with George Peter Banyard and it's
> > purpose
> > is nothing more like to allow the use of PHP Namespace in the core.
> >
> > The RFC is described at https://wiki.php.net/rfc/php-namespace-in-core
> >
> > Best Regards,
> > Michał Brzuchalski
>
> Hello,
>
> Even though I'm fond to the idea of languages having the official
> stdlib contained
> into a single space, there seems to be no practicality on a \PHP namespace
> usage
> at this point IMMO.
>
> We would be in a situation where things are either mixed in and out
> the new namespace
> - Should I `use function PHP\{json_encode, json_decode}` or was it in
> the root??? - or
> everything that already exists must first receive an alias into this
> new namespace, to allow
> consistency... but then there would probably be no plans ever to
> actually move existing stuff
> into the new prefix in the future.
>
>
You've misunderstood the idea. Standard library functions classes etc. are
not language features.
It's not a purpose of this RFC to move existing functions from the standard
library but to allow core language features
to use it. Described examples show benefit in use for symbols tightly
coupled to features PHP as a language delivers.

Most of the standard library function can be replaced by implementations in
PHP or by wrapping around a C library.
The features tightly coupled with the language is for eg. the Reflection
mechanism, PhpToken class as described.
Upcoming PhpAttributes for which proposal is a work in progress.

Those all features will not likely be moved to PECL and this RFC proposal
is to allow features like that to use PHP namespace.

Cheers,
Michał Brzuchalski

Reply via email to