I don't have php.net account, but I don't plan to just complaining... That's why you don't see many emails from me... I would like to back to the main discussion on this thread, specially to a point raised by Johannes. I really don't think we need multiple namespaces per file and, in this case, the braces are useless. And it seems we all agree that it's a good practice to use only one namespace per file. Since, we allow multiple namespaces, we should force a code clearer than the below code.
<?php namespace one; use Blah::A; // code namespace two; use Foo::A; ?> In this case, when the code doesn't follows the best practices, I think the penalty of using braces is reasonable. Since the below code is easier to maintain. <?php namespace one; { use Blah::A; // code } namespace two; { use Foo::A; } ?> On Dec 12, 2007 11:14 AM, Johannes Schlüter <[EMAIL PROTECTED]> wrote: > Hi, > > On Tue, 2007-12-11 at 17:13 -0600, Gregory Beaver wrote: > > Hi, > > > > I've been furiously working behind the scenes with Stas and Dmitry, and > > have some enhancements to namespaces in the form of 2 patches. > > > > 1) multiple namespaces per file > > 2) use ::name; > > > > 1) multiple namespaces per file > > > > This is implemented as such: > > > > <?php > > namespace one; > > use Blah::A; > > // code > > namespace two; > > use Foo::A; > > ?> > > I don't care about multiple namespaces per file, but if we allow > multiple namespaces in one file we should also enforce these. If we > don't enforce the braces people will write code like above and that's > really bad for maintenance. (While it makes me even more happy that I > don't do consulting stuff anymore - I don't read other people's PHP code > anymore - but from that time I know that people will misuse such a > feature) > > johannes > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- ______________________________________ Saulo Vallory descolando! - www.descolando.com.br LegoCode - www.legocode.com.br Neoconn Networks - www.neoconn.com +55 21 8182-0308