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.
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
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
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.
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,
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
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
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
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
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
10 matches
Mail list logo