+ 46
In academic environments, it can frequently be the case where many are condemned for not using 'using namespace std'. Lecturers, especially those who lack experience in actual software development, want an easy job marking the papers. Were we taught about it's purpose and why 'using namespace std' is needed, or how it works? No. We weren't even taught what namespaces are.
It is simply a bad practice to freely use something when you don't understand how it works.
What I see essential is for namespaces to be taught to beginners with sufficient explanation, and not forced upon them. The recent disagreements I had with the system got me trying to not use it (which is a royal pain once you've stuck with it for some time, all the more reason to eliminate blind practice of 'using namespace std').
+ 14
I think namespaces are unneeded...the problem with C++ is that it tries to do certain things in too many different ways. Why use namespaces when you can use header files with class declarations? It does not seem necessary.
+ 12
the problem is I don't know how to code without the namespace........ I learned C++ in sololearn and all of the example given are with namespace đđđ (I feel like the answer is out of the question ==)
+ 11
@Ace
i agree with you
as beginner i will try to remember your advice.
but i think i will gonna need a time to adapt.
+ 7
Personally, I only use namespaces for quick codes. My first usage of it was here in SoloLearn Playground. The whole concept didn't exist when I started using 'C with Classes' and I ignored it, when it did get added. It became needed as the standard libraries grew, masively increasing the symbols being defined.
+ 6
In my opinion namespaces are a good practice.
Well i am not much experienced in C++ and mostly work on turbo IDE in which namespaces are absent but from what I know about Namespaces they are very good for creating different scopes of variables. Using them we can use variables in a systematic manner with defining our own scopes.
+ 6
Your own argument is in favor of namespaces. You're pointing out the dangers of (ab)using the "using namespace" syntax, which I completely agree with.
0
i am agree with u #Ace Thats what im questioning to them
- 15
Java is more hard or c++