2012/11/9 Zack Weinberg <[email protected]>: > On 2012-11-09 1:28 PM, Kyle Huey wrote: >> >> I reviewed a patch today that had: >> >> using namespace mozilla; >> using namespace dom; > > > The style guide should forbid `using namespace` altogether. Use only what > you need.
In a given cpp file (in a single TU), as long as it builds, I don't see the problem with using namespace. Of course I see the theoretical problem, it's never been a real issue IME. If it ever causes problems in a given cpp file it's easy enough to stop doing using namespace there. Likewise (even more so) at function scope I don't see an issue with using namespace. The only issue I see is using namespace at file scope in a _header file_. I would support a coding style rule against that. I filed bug 798033 about removing the occurences that we have of that, and a new contributor is making great progress there. Benoit > > > _______________________________________________ > dev-platform mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

