Re: Namespace
| From: | Robert Cummings | Date: | Fri, 07 Dec 2007 21:09:26 +0000 |
| Subject: | Re: Namespace | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33854@lists.php.net to get a copy of this message | ||
On Fri, 2007-12-07 at 15:55 -0500, Sam Barrow wrote:
> Very good point
>
> namespace stuff ;
> {
> function myfunction() {
> return true ;
> }
> }
>
> That would actually work, but it's not quite the same as you have the
> semicolon after the namespace declaration, which looks kind of stupid.
> Overall i dont think braces are a bad idea.
>
> People say multiple namespaces per file are confusing, but braces would
> partially solve this. If using braces makes multiple namespaces per file
> more likely, I say that's the way to go, as I am very much in favor of
> multiple namespaces per file.
As I've said previously, I'm neutral to the namespace thing. I imagine
I'll realize advantages in the future, but given that I try to keep my
code backward compatible until the death of a version, I don't think
I'll be using them until about 2012. However, having said that, I would
also have to say I'm in the braces camp. The above example while
perfectly valid, is an obvious hack and throws a little WTF factor at
anyone viewing it :)
Cheers,
Rob.
--
...........................................................
SwarmBuy.com - http://www.swarmbuy.com
Leveraging the buying power of the masses!
...........................................................