4 ms·
At least in my experience, no compiler will save you from having to suddenly manage namespaces if you add a dependency mid-project that has namespace collisions
by wnkrshm 8y ago
At least in my experience, no compiler will save you from having to suddenly manage namespaces if you add a dependency mid-project that has namespace collisions.
I always use STL functions with the explicit namespace, since I work in the namespace of the code I'm writing by default (to not cause other people problems with collisions down the line).
I've seen this done in other projects and thought it was a good practice.
- xemdetia 8y agoI agree that this is generally good practice, and if the interviewee explained that it was just to dodge problems with making assumptions with a large codebase/build process I would always give them extra points. It almost is telling that the codebase that the interviewer was working in was rather small (not in a negative way) that these stylistic issues didn't fit his current mental model, but such is the way of C++.