|
|
|
|
|
by CyberDildonics
998 days ago
|
|
Lots of people don't. If they did they wouldn't have these problems of wondering where functions are defined. Who are these people not using an IDE when working professionally with a team of people? That's a much bigger red flag than putting using namespace std; inside a compilation unit. If there is ambiguity, then you can just add a std:: in front of a function. This is all within a single compilation unit anyway. |
|
You seem to have completely ignored what I wrote after "even those who do..."? Like I explained, you're not immune to these issues just because you use an IDE.
And to answer your question, it's lots of people at companies whose C++ talent you would (or should) appreciate. And many people use both IDEs and text editors, depending on lots of factors, like the size of the task.
> If there is ambiguity, then you can just add a std:: in front of a function. This is all within a single compilation unit anyway.
Just because it's in a single TU that doesn't mean it won't be somebody else's problem.
First, someone who modifies a header you include will now potentially break your code simply via a name collision. You're making it harder for them to change their code without breaking yours. And you're probably not their only consumer.
Second, you're now doing ADL lookups instead of regular lookups. This can add a ridiculous amount of noise to error messages for widely used identifiers, which will make life much harder for everyone.
Third, not everything results in an ambiguity. The moment someone introduces an overload that happens to be a better match for your lookup, this can silently cause your code to misbehave. It might not be the most common problem but it's sure as heck one of the most painful when you or your teammates eventually get bitten.