On 2012-11-10 12:58 AM, Robert O'Callahan wrote:
What exactly is the benefit here? As far as I know, "using namespace A; using namespace B;" where both A and B define Foo doesn't actually cause a compile error unless/until the code actually references "Foo".
The scenario I'm concerned with is when a .cpp file does 'using namespace A;' and then goes on to define a bunch of its *own* symbols; later someone adds a symbol to namespace A, and gets an unexpected break possibly miles from their own code. I see *avoiding* this phenomenon as the primary *benefit* of namespaces, and it's totally lost if you do 'using namespace' even in .cpp files.
Sort of the same thing as adding DOM properties that then collide with website expandos.
zw _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform