Why is using namespace std bad practice?

I've just recently come across a discussion where some say using namespace std; is bad practice due to its global scope.

Can anyone input further analysis on why this is frowned upon?
That was the discussion I was mentioning earlier, however I don't quite understand why it's considered to be bad practice.

Can someone simplify it for me?
Yes, tutorial to namespaces:
http://www.tutorialspoint.com/cplusplus/cpp_namespaces.htm

If you do not understand what a namespace is, the answer from StackOverflow is difficult to understand.
using namespace allows the programmer to save keystrokes for the rest of the file. Also that carries over into any file that includes that file. The answer is saying that possibly there is already a function named Quux in one namespace. So code that just calls Quux would call the version from the first namespace. However, if that function is added to a second namespace, then Quux could really come from either of the namespaces since both of them are being used.

Without using namespace, a programmer has to type the name of the namespace to tell the compiler that Quux comes from namespace one One::Quux. In that situation, when Quux is added to namespace two, the compiler has no confusion.
Topic archived. No new replies allowed.