Re: Namespace

From: Date: Sat, 08 Dec 2007 20:12:04 +0000
Subject: Re: Namespace
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-33869@lists.php.net to get a copy of this message
On 07/12/2007, Lokrain <lokrain@gmail.com> wrote: > Hello all, > > I just wanted to drop an opp. Just to see the logic, when we have > programming structure class, interface, function, if statement, switch > statement etc, we have bracers encapsulation. This is the logic that most > programming language give to show a programmer that something is inside > something. We here have namespace with the same idea, and no bracers. > > Conclusion: namespaces are not logical => no thanks > > PS. By the way, I do not think that any workarounds on that logic will not > be nice. > I'm trying to understand the argument against using braces. And that has led me to the following question. Assuming no braces, how would I put code OUTSIDE of the namespace in a single file. <?php namespace XYZ; xyz related code goes here non xyz related code goes here but how do I let PHP know it isn't part of xyz? Do I have to change namespace by using a dummy namespace? Same issue how do I refer to the global namespace. Richard. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"

« previous php.internals (#33869) next »