The-C-20-Masterclass-Source-Code icon indicating copy to clipboard operation
The-C-20-Masterclass-Source-Code copied to clipboard

This is not a issue but a suggestion to use using namespace std; instead of using std:: every time before cout in C++.

Open vishantrathi opened this issue 1 year ago • 1 comments

https://www.programiz.com/cpp-programming/std-namespace

Checkout above link for more explanation

I do not want to misinform others, so please correct me if I'm wrong.

vishantrathi avatar Jan 29 '24 13:01 vishantrathi

https://www.programiz.com/cpp-programming/std-namespace

Checkout above link for more explanation

I do not want to misinform others, so please correct me if I'm wrong.

vishantrathi avatar Jan 29 '24 13:01 vishantrathi

I do think you have a point but I think the creators should keep it as is, because this is a course aimed at beginners. It's difficult to figure out what works better for beginners, but since the content has already been created, and because a beginner wouldn't know what they're missing out on, it'd be difficult to prove that updating that would be ultimately be better.

Your point is that it's less keystrokes, but what about the learning aspect? How does updating improve learning or how does keep it impede learning?

Golem2024 avatar Mar 03 '24 01:03 Golem2024

Explicitly using std:: in front of names makes it clear where the name is coming from. Without that, the global namespace gets polluted pretty fast. Here is a good piece of reading on the subject.

rutura avatar Mar 03 '24 19:03 rutura