Re: Discussion: Object-scoped RNG

From: Date: Wed, 12 May 2021 15:07:20 +0000
Subject: Re: Discussion: Object-scoped RNG
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-114447@lists.php.net to get a copy of this message
On Wed, May 12, 2021 at 8:58 AM Nikita Popov <nikita.ppv@gmail.com> wrote: > > On Wed, May 12, 2021 at 4:51 PM Levi Morrison via internals <internals@lists.php.net> > wrote: >> >> > Also, I am happy to see that Nikita's rules for namespace assignment to >> > extensions have been approved. I'm going to use the RNG >> > namespace. >> >> Just to be clear, you can only use RNG as a namespace if >> the >> extension is named ext/rng. You cannot add namespaced >> things to >> standard nor SPL nor >> Core. > > > This is not correct. The namespace policy RFC specifically and explicitly allows namespacing of > components in standard/core, see > https://wiki.php.net/rfc/namespaces_in_bundled_extensions#core_standard_spl. > Adding something under the RNG\ namespace inside ext/standard is fine (modulo due diligence on the > specific choice of namespace name). > > Regards, > Nikita It says: > Because these extensions combine a lot of unrelated or only tangentially related functionality, > symbols should not be namespaced under the Core, Standard or Spl namespaces. Instead, these > extensions should be considered as a collection of different components, and should be namespaced > according to these. The second sentence is not well defined. I am confident this was discussed as part of the RFC discussion. The understanding I, and at least a few others, took away is that it means these extensions can't namespace anything until another RFC defines that second sentence. In other words, the RFC says you cannot name things in those extensions with the namespace "Core", "Standard", nor "SPL", but it doesn't define what you _can_ use. This is really important. If the RFC author did not have this same consensus then this is a MAJOR problem that needs immediate discussion. Levi Morrison

« previous php.internals (#114447) next »