Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 8th, 2005, 4:56 AM   #41
prolog
Programmer
 
Join Date: Jul 2005
Location: Germany
Posts: 69
Rep Power: 4 prolog is on a distinguished road
Hi,

that can have various reasons. InfoGeek allready mentioned one. Firstly it depends on the project you are working on. If you're developing a library it's most likely that u use the std:: selector.

Secondly it depends on how much different namespaces exist in your project. I can just speak for myself, but i want to know which method is called if two methods live in different namespaces but have similar naming. That is i want to know if i used for example the std::copy or my own lets say dts::copy in a certain situation. And i don't want to jump out of a diffecult part of code at the bottom to the top to check what namespace i had imported.

Another reason is that u most often do not use that much std::-code so it's more convinient to use "using std::cin;" or precede each element with the namespaceprefix and scope-op.

Sometimes you even have to use the std::whatever syntax in order to remove name-clashes.

Namespace pollution is as bad as environment pollution

So far ...
__________________
-= C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do succeed, you will blow away your whole leg. =- Bjarne Stroustrup

Last edited by prolog; Aug 8th, 2005 at 5:11 AM.
prolog is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:19 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC