Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Except the analogy to Python lacks one critical point: C++ headers and Python imports do not work in nearly the same way. Do not EVER use a "using namespace <foo>" in a header file; any code that #include's such a header will pull this in.

In .cpp files it's ok (and almost required if you're using boost, unless you want boost::foo:bar::type everywhere). It still requires a bit of thought, though.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: