4 ms·
To answer your final question: No, I haven't. Lucky me :) I think there's multiple levels to this. 1. On a personal level: You clearly dodged a bullet. Also:
by btschaegg 8y ago
To answer your final question: No, I haven't. Lucky me :)
I think there's multiple levels to this.
1. On a personal level: You clearly dodged a bullet.
Also:
> I didn't shout or get mad. I practiced my Buddhist learning and turned the other cheek without emotion.
Kudos to you.
2. On a more organizational level: That's what style guides are for, end of discussion (a coherent code base is worth much more than individual subjective quibbles). Would the guy have been a professional, the answer should have been "you'll have to change the style to match our style guide, but that doesn't matter here".
3. On a technical level: I don't write much C++ code nowadays, but yeah, I also always use the std:: prefix.
My reasoning would be this:
- "using namespace X;" in a header is a no-go anyway (I don't think is negotiable).
- In a .cpp file, I'd rather only operate in one namespace implicitly to avoid a giant mess of overloads. To the argument "compilers are amazing": Editors are not, I can guarantee you that much.
- I never write code for std, since that's reserved for the standard library and STL. So, for me, there's no valid reason ever to use "using namespace std;".
- On the "confusing" argument: I'd wager you'd never use std::cout directly except in very simplistic scenarios. Usually, there's either an abstraction (typedef is your friend there, if you want simpler names), or you write your own functionality on top of it (certainly not in the std:: namespace). Similarly, if one of your functions contains more than a couple instances std::<whatever>, it probably is way too big, anyway.
But then, the technical level is the most subjective part of all of them.