Re: Migrating PHP classes to built in namespace

From: Date: Thu, 11 Jun 2015 08:22:01 +0000
Subject: Re: Migrating PHP classes to built in namespace
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-86590@lists.php.net to get a copy of this message
Hi Tony, On Thu, Jun 11, 2015 at 4:37 PM, Tony Marston <TonyMarston@hotmail.com> wrote: > "Yasuo Ohgaki" wrote in message > ‹ÎØ^5’ëÝ > *„ {news:CAGa2bXZvuqV4Kwru+wUL-bfTb9_tnv=L16rEu-+w+uAjx4H1Mw@mail.gmail.com.... > >> >> 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 classes >>> 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 >> > > The 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. > It does not create huge BC. It's matter of adding a line for namespace or having a default namespace setting. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#86590) next »