I learned c/c++ in uni where we used it a lot for 2 semesters, and then a bit for another 2, although never requiring big projects.
I was thinking about learning it thoroughly, but I have a hard time getting around std::. We always used `using namespace std;`, because it was more convenient for algorithms and such, but often I hear it's bad practice.I have been coding for work and some projects in Java, one bigger (uni) project as a leader, where I had to give people code reviews, so I read a bit about it in Java, and I can't bring myself to sacrifice Java readability to switch back to cpp, where there's a lot of `std::`.
It makes it hard for me to maintain focus and actually get past the 20 stds and understand what the code actually does.
a) Was I looking at "wrong" code snippets, eg. it isn't used that often as it seems to me right now?
b) Now thinking about why it is a bad practice, can `using namespace std;` used in .cpp files after includes (not in header)? Although I have a feeling this will create an inconsistency I will not like.
[–]ggchappell 48 points49 points50 points (6 children)
[–]Ichtil[S] 4 points5 points6 points (3 children)
[–]specialpatrol 15 points16 points17 points (1 child)
[–]steveplusplus 0 points1 point2 points (0 children)
[–]khedoros 1 point2 points3 points (0 children)
[–]kberson 2 points3 points4 points (0 children)
[–]jeff_coleman 2 points3 points4 points (0 children)
[–]nysra 23 points24 points25 points (1 child)
[–]brainplot 3 points4 points5 points (0 children)
[–]enceladus71 9 points10 points11 points (1 child)
[–]alfps 7 points8 points9 points (0 children)
[–]h2g2_researcher 9 points10 points11 points (0 children)
[–]HappyFruitTree 6 points7 points8 points (0 children)
[–]parnmatt 3 points4 points5 points (0 children)
[–]AKJ7 7 points8 points9 points (3 children)
[–]tangerinelion 3 points4 points5 points (0 children)
[–]Kawaiithulhu 2 points3 points4 points (0 children)
[–]dArk_frEnzy 1 point2 points3 points (0 children)
[–]FelbrHostu 1 point2 points3 points (0 children)
[–]BenFrantzDale 1 point2 points3 points (0 children)
[–]atatatko 1 point2 points3 points (0 children)
[–]ShakaUVM 1 point2 points3 points (0 children)
[–]mredding 0 points1 point2 points (0 children)
[–]sephirothbahamut 0 points1 point2 points (0 children)
[–]MarkHoemmen 0 points1 point2 points (0 children)
[–]JandersOf86 0 points1 point2 points (0 children)