It has limited usefulness for learning C++, but it ultimately promotes vague code and dumps common names into the global namespace, possibly introducing bugs. I think in non-trivial programs it's a lazy shortcut that provides minimal additional convenience at best. You can place using... between headers to keep headers after it from dumping into the global, but that makes it more confusing.
There is one exception, though. Some STL libraries (though not necessarily compliant) place standard C functions in namespace std. Putting using... in the local scope of a function can be useful to promote portability to those compilers and it has no effect outside of that scope.
ta0kira
|