Re: Migrating PHP classes to built in namespace
| From: | Tony Marston | Date: | Fri, 12 Jun 2015 08:10:37 +0000 |
| Subject: | Re: Migrating PHP classes to built in namespace | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86614@lists.php.net to get a copy of this message | ||
"Yasuo Ohgaki" wrote in message news:CAGa2bXaMoHDVoZRNNPEEM--km-in4tSyux=tUB0pAEs4tWWF-w@mail.gmail.com...
Hi Tony, On Thu, Jun 11, 2015 at 4:37 PM, Tony Marston <TonyMarston@hotmail.com> wrote:Huge or not, it is still a BC break. And what is the benefit in userland? -- Tony Marston"Yasuo Ohgaki" wrote in message news:CAGa2bXZvuqV4Kwru+wUL-bfTb9_tnv=L16rEu-+w+uAjx4H1Mw@mail.gmail.com...It does not create huge BC. It's matter of adding a line for namespace or having a default namespace setting.Hi Jakub, On Thu, Jun 11, 2015 at 7:43 AM, Jakub Kubícek <kelerest123@gmail.com> wrote: This is weird and ugly what you're fabricating here. The PHP classesThe fact that other languages have this feature should not be a reason to add it to PHP, especially as it would provide a huge BC break with absolutely no practical, only theoretical, benefits.should be all in global namespace. I am really against some namespacing of them.It may seems weird if you aren't familiar with languages support this kind of feature. However, you'll find many languages support this or similar. JavaScript is one of them. JavaScript allows to override any functions, for example. It's works like importing other namespace function into root. i.e. Provide different feature with the same name. For long term PHP evolution, having ability to import some namespace into root namespace is great feature. i.e. API/Module version up. We can provide both old and new during migration. Use of namespace is better approach because it may give us super clean global namespace also. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net