🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2765

Re: using namespace std

#2765
From: David Vandevoorde
Date: Wed, 29 Nov 1995 00:52
26 lines
1401 bytes
>>>>> "NM" == Nathan Myers <ncm@netcom.com> writes:
[...]
NM> Do those teaching C++ agree that namespace std encapsulation is a
NM> failure?  When you write about C++, are you advising readers to
NM> say "using namespace std;"?

I wouldn't call it a failure, but I would like to see some ``topical''
comparting so that I might write:
	using namespace ::std::strings;
or
	using namespace ::std::vectors;
etc. (I'm mentioning these two because I expect they often clash with
existing names, unlike say ostream or valarray.)

Although I've never encouraged anyone to use
	using namespace std;
many have asked me if there was a nice way to only cause part of the
namespace std to be considered for name-lookup.

	Daveed

---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <VANDEVOD.95Nov28152659@avs.cs.rpi.edu>
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
References: <LASSI.TUURA.95Nov22175004@neppari.cs.hut.fi> <30BA21AC.4E9C@netcom.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
From: vandevod@cs.rpi.edu (David Vandevoorde)
Newsgroups: comp.std.c++
Subject: Re: using namespace std
Date: 29 Nov 1995 00:52:13 GMT
Organization: RPI Computer Science
Approved: matt@physics2.Berkeley.EDU (Matt Austern)
Message-ID: <VANDEVOD.95Nov28152659@avs.cs.rpi.edu>
References: <LASSI.TUURA.95Nov22175004@neppari.cs.hut.fi> <30BA21AC.4E9C@netcom.com>
NNTP-Posting-Host: physics2.berkeley.edu