On 2012-11-09 10:49 PM, Robert O'Callahan wrote:
On Fri, Nov 9, 2012 at 10:14 PM, Zack Weinberg <za...@panix.com> wrote:

The style guide should forbid `using namespace` altogether.  Use only what
you need.


I really don't think it should. I do not want to see source files full of
difficult-to-maintain and unnecessary "using" boilerplate a la Java
"import". At least with Java imports, there are really good tools for
managing the mess; we don't have those tools for C++.

I challenge your presuppositions. The average file should need no more than one or two `using SYMBOL;` lines per header it includes. Maintaining this will not be significantly more difficult than maintaining the existing lists of header inclusions (which I admit is already too difficult). And I think that it is worth it in order not to lose one of the major benefits of namespaces, viz. that you don't have to worry about symbol conflicts with anything but what you actually use.

zw
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to