Paul Herring wrote: > On 5/26/07, Victor A. Wagner Jr. <[EMAIL PROTECTED]> wrote: > >> Ray Devore wrote: >> >>> --- chipaug <[EMAIL PROTECTED]> wrote: >>> > [...] > >>>>> #include <iostream> >>>>> >>>>> using namespace std; >>>>> >>>>> >>> The above statement is not necessary since you are >>> using std:: in the code below. Using the std:: with >>> the appropriate items makes for cleaner code. When >>> you use "using namespace std;" you have destroyed the >>> reason for doing a namespace in the first place. You >>> also get things from the namespace that you do not >>> expect. >>> >>> >> I'm gonna disagree with you here. cluttering your code with std:: is >> just that...cluttering your code >> and using namespace std; does NOT destroy the reason for namespaces. >> If it did, it would hardly be part of the language. >> your assertion that you get things that you do not expect is also >> somewhat of an overstatement. That kind of problem comes up only when >> you put such things in header files. >> > > Could we have your thoughts on the answer to C++ FAQ 27.5 Victor? > > http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5 > yup, FUD. read Item59 of "C++ Coding Standards" by Sutter and Alexandrescu... .I quote the 1st paragraph under *Discussion*
In short: You can and should use namespace *using* declarations and directives liberally /in your implementation files after *#include* directives/ and feel good about it. Despite repeated assertions to the contrary, namspace *using* declarations and directives are not evil and they do not defeat the purpose of namespaces. Rather, they are what make namespaces usable. [Non-text portions of this message have been removed]
