Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-26 Thread Derick Rethans
On Tue, 24 Jun 2008, Rasmus Lerdorf wrote: Derick Rethans wrote: On Tue, 24 Jun 2008, Alexey Zakhlestin wrote: it won't be a serious 'wtf', as on the top of the file, there would be some kind of use MySuperLibrary::DateTime; I know, but 400 lines down in the code you can't

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-26 Thread James Dempster
I would agree, they seem to cause more problems and pollution than it would solve. I like the idea behind namespaces but what I've seen of the current implementations I would rather do without. Unfortunately I don't have any ideas or solutions to the problems. /James Dempster On Thu, Jun 26,

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-25 Thread Greg Beaver
Derick Rethans wrote: On Fri, 20 Jun 2008, Gregory Beaver wrote: The user is obviously intentionally creating a DateTime class, and doesn't care about the internal classname in this script. The attached patch against PHP_5_3 would fix the issue by eliminating the check for conflict with

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-25 Thread Jochem Maas
Greg Beaver schreef: Derick Rethans wrote: .. The real WTF comes into play when you have a static method that resolves to the same name as a namespaced function, something that absolutely must be worked out prior to PHP 5.3's release. I know a few ideas are percolating about on this one

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-24 Thread Derick Rethans
On Fri, 20 Jun 2008, Gregory Beaver wrote: The user is obviously intentionally creating a DateTime class, and doesn't care about the internal classname in this script. The attached patch against PHP_5_3 would fix the issue by eliminating the check for conflict with CG(class_table) in the

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-24 Thread Alexey Zakhlestin
On Tue, Jun 24, 2008 at 6:36 PM, Derick Rethans [EMAIL PROTECTED] wrote: On Fri, 20 Jun 2008, Gregory Beaver wrote: The user is obviously intentionally creating a DateTime class, and doesn't care about the internal classname in this script. The attached patch against PHP_5_3 would fix the

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-24 Thread Derick Rethans
On Tue, 24 Jun 2008, Alexey Zakhlestin wrote: On Tue, Jun 24, 2008 at 6:36 PM, Derick Rethans [EMAIL PROTECTED] wrote: On Fri, 20 Jun 2008, Gregory Beaver wrote: The user is obviously intentionally creating a DateTime class, and doesn't care about the internal classname in this script.

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-24 Thread Rasmus Lerdorf
Derick Rethans wrote: On Tue, 24 Jun 2008, Alexey Zakhlestin wrote: On Tue, Jun 24, 2008 at 6:36 PM, Derick Rethans [EMAIL PROTECTED] wrote: On Fri, 20 Jun 2008, Gregory Beaver wrote: The user is obviously intentionally creating a DateTime class, and doesn't care about the internal

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-24 Thread Lukas Kahwe Smith
On 24.06.2008, at 16:52, Derick Rethans wrote: On Tue, 24 Jun 2008, Alexey Zakhlestin wrote: On Tue, Jun 24, 2008 at 6:36 PM, Derick Rethans [EMAIL PROTECTED] wrote: On Fri, 20 Jun 2008, Gregory Beaver wrote: The user is obviously intentionally creating a DateTime class, and doesn't

Re: [PHP-DEV] simple solution to another namespace conundrum?

2008-06-24 Thread James Dempster
I find it interesting that we could quite possibly get just as many clashes with namespaced code. Of course it comes down to how well the developer implements there code. It's almost like namespace is just a method of aliasing long class names. On Tue, Jun 24, 2008 at 4:38 PM, Lukas Kahwe Smith

[PHP-DEV] simple solution to another namespace conundrum?

2008-06-20 Thread Gregory Beaver
Hi, You probably have seen Derick's blog post http://www.derickrethans.nl/namespaces_in_php.php It occurred to me today that there might be a simple, elegant solution to this problem. First, let's imagine someone writes this code: ?php include '/path/to/library/Closure.php'; use