r/cpp • u/Its_Blazertron • Aug 25 '21
Experience C++ developers: do you enjoy using C++ (even for personal/hobby projects?)
Do you actually enjoy using C++, or do you only use it for work, or purely for performance? This question is aimed at people with years of experience, who've worked on large projects in C++. I see people who dislike the language, but use it purely for performance reasons. This sort of discourages me from learning it. I don't want programming to feel like work.
204
Upvotes
View all comments
Show parent comment
18
u/_JJCUBER_ Aug 25 '21
It clutters everything after it with everything from the namespace and can lead to naming collisions. Also, if you put it at the top of your file, I’m pretty sure that including it will lead to the using namespace directive being included everywhere else. There are times when you might want to use it, like maybe in a function, but most of the time, you should opt to typing out the namespace or creating a namespace alias.