Re: Namespace

From: Date: Fri, 07 Dec 2007 20:38:50 +0000
Subject: Re: Namespace
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-33851@lists.php.net to get a copy of this message
On Fri, 2007-12-07 at 15:21 -0500, Ken Stanley wrote: > I understand what you mean, but I was just trying to put a real-world face > on a so-far theoretical problem. But that does raise an interesting point; > we can already use braces anywhere and everywhere, and while we could easily > wrap namespaces in anonymous braces like you describe, why not just go the > extra mile and allow attaching them directly to the namespace, i.e.: > > <?php > > namespace XYZ { > // Do stuff > } > > // Looks a little better than > > { > namespace XYZ; > > // Do stuff > > } > > ?> > > Of course, this is just my opinion, and given your suggestion, at least > there is an acceptable solution already. Thank you. :) I don't see how the latter isn't almost entirely possible: <?php namespace XYZ; // note the semi-colon :) { // Do stuff } ?> Cheers, Rob. -- ........................................................... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ...........................................................

« previous php.internals (#33851) next »