Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-09 Thread Jessie Hernandez
I thought global names were considered in the patch, but now that I re-read Dmitry's post, only symbols in the namespace and internal symbols are considered. I read through most of the posts regarding namespaces, but could not find a reason why global names are not looked up.

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-09 Thread Sam Barrow
I agree with this 100%, is this something that could be changed? I don't see a reason behind it. On Sun, 2007-12-09 at 16:24 -0500, Jessie Hernandez wrote: internal class/function with the same name. Dmitry, what's the reason this lookup logic wasn't used in your patch? -- PHP Internals

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-09 Thread Dmitry Stogov
Jessie Hernandez wrote: I thought global names were considered in the patch, but now that I re-read Dmitry's post, only symbols in the namespace and internal symbols are considered. I read through most of the posts regarding namespaces, but could not find a reason why global names are not

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-08 Thread Gregory Beaver
Matthias Pigulla wrote: Von: Gregory Beaver [mailto:[EMAIL PROTECTED] Exactly - which is why you should never put classes, functions or constants in the __php__ namespace. The convention I am proposing is to only use __php__ for code that *uses* re-usable components, not *declares* them.

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-08 Thread Jessie Hernandez
Hi Greg, How about this: any non-namespaced file that uses use statements is implicitly put into the __php__ namespace (or whatever other name is chosen, or having the namespace name be the path of the file)? With this, use will never import any symbols into the global namespace. Regards,

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-08 Thread Gregory Beaver
Jessie Hernandez wrote: Hi Greg, How about this: any non-namespaced file that uses use statements is implicitly put into the __php__ namespace (or whatever other name is chosen, or having the namespace name be the path of the file)? With this, use will never import any symbols into the

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-07 Thread Gregory Beaver
Matthias Pigulla wrote: 1) recommend all global non-namespaced code that wishes to import namespaced code via use Namespace::Classname add a namespace __php__; at the top of the file, and that the __php__ namespace be reserved for use by end-user applications. 5) namespaces provide

AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-07 Thread Matthias Pigulla
1) recommend all global non-namespaced code that wishes to import namespaced code via use Namespace::Classname add a namespace __php__; at the top of the file, and that the __php__ namespace be reserved for use by end-user applications. 5) namespaces provide these benefits that are not

Re: AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-07 Thread Larry Garfield
On Friday 07 December 2007, Gregory Beaver wrote: If new, future core extensions showed up in a reserved PHP:: namespace, you would be :-). Exactly - which is why you should never put classes, functions or constants in the __php__ namespace. The convention I am proposing is to only use

AW: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-07 Thread Matthias Pigulla
Von: Gregory Beaver [mailto:[EMAIL PROTECTED] Exactly - which is why you should never put classes, functions or constants in the __php__ namespace. The convention I am proposing is to only use __php__ for code that *uses* re-usable components, not *declares* them. Let alone __php__. If