French software engineer with 15 year experience on 3D data visualisation and processing. Lots of C++, and switch to Unity recently.
I like when it run fast 😉
I would say "Never ever use using namespace in a header file". using namespace in .cpp file is not that bad. But using it in header will contaminate all the file that include, directly or indirectly, this header. Ex (based on true story):
#include<AgainAnotherFile.h>void*ptr=std::malloc(...);// [hundreds of line later]free(ptr);// Oups... It build, maybe it even run, but it's actually CustomMemoryManager::free() which is called...
And then, good luck to find the leak...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
for 4) Avoid Global Use of using namespace
I would say "Never ever use using namespace in a header file".
using namespace in .cpp file is not that bad. But using it in header will contaminate all the file that include, directly or indirectly, this header. Ex (based on true story):
CustomMemoryManager.h
SomeFile.h
SomeOtherFile.h
AgainAnotherFile.h
AndYetAnotherFile.cpp
And then, good luck to find the leak...