Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33874 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56113 invoked by uid 1010); 8 Dec 2007 21:23:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56098 invoked from network); 8 Dec 2007 21:23:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2007 21:23:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 205.234.132.11 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 205.234.132.11 scottsdale.servershost.net Received: from [205.234.132.11] ([205.234.132.11:43892] helo=scottsdale.servershost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/AB-51488-D4B0B574 for ; Sat, 08 Dec 2007 16:23:25 -0500 Received: from [216.15.51.211] (port=50255 helo=[192.168.1.96]) by scottsdale.servershost.net with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1J178v-0003nw-1a; Sat, 08 Dec 2007 15:23:25 -0600 To: RQuadling@GoogleMail.com Cc: Lokrain , internals@lists.php.net In-Reply-To: <10845a340712081212v7cbd1b6am4020eb3f49544f14@mail.gmail.com> References: <475713B2.4030802@iamjochem.com> <475719ED.8050306@zend.com> <200712052110.37023.larry@garfieldtech.com> <47576AEF.4030306@omegavortex.net> <5474E017-DF97-4B91-8FE0-7D6831E64F56@bitxtender.com> <4EE0727E-ABBA-490D-B247-8C6E9A9727BA@gmx.net> <345fd5cd0712070815k55eac42fh14d5685039c03113@mail.gmail.com> <345fd5cd0712070816m2c0d4a22hd03f91abff2405ae@mail.gmail.com> <10845a340712081212v7cbd1b6am4020eb3f49544f14@mail.gmail.com> Content-Type: text/plain Date: Sat, 08 Dec 2007 16:23:24 -0500 Message-ID: <1197149004.9893.2.camel@sams-room> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - scottsdale.servershost.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sambarrow.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] Namespace From: sam@sambarrow.com (Sam Barrow) Once you say "namespace xyz ;" everything in the file is now relative to namespace xyz. To refer to the global namespace, you use the following On Sat, 2007-12-08 at 20:12 +0000, Richard Quadling wrote: > On 07/12/2007, Lokrain 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. > > 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!" >