On 11 Jul 2014, at 15:03, John Baldwin <j...@freebsd.org> wrote: > > http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice > > is a decent start on the multitude of reasons to avoid using it. > > I also avoid 'import * from foo' in Python for similar reasons. > > OTOH, most of the C++ code bases I've had to work with do have a global > 'using namespace std'. Great fun when someone decides it would be > convenient to add 'using namespace boost' to the mix.
Note that, even though 'using namespace std' is a bad idea, 'using std::vector; using std::string' and so on is not so bad. For things that live in the base system, there's not much danger of boost conflicts. 'using namespace std' is mostly a problem when it's in headers (especially library headers), because it can break large amounts of code. In a tiny utility, it's probably the right thing to do. David _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"