From owner-svn-src-all@FreeBSD.ORG Fri Jul 11 19:38:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A7F8E94; Fri, 11 Jul 2014 19:38:40 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE892EF0; Fri, 11 Jul 2014 19:38:40 +0000 (UTC) Received: from [192.168.0.7] (cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52]) (authenticated bits=0) by theravensnest.org (8.14.7/8.14.7) with ESMTP id s6BJcMYJ035005 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 11 Jul 2014 19:38:26 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r268491 - head/usr.bin/users From: David Chisnall In-Reply-To: <201407111003.57785.jhb@freebsd.org> Date: Fri, 11 Jul 2014 20:38:16 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <12328E44-58A8-4334-A7F4-C7F29C9F6D0E@FreeBSD.org> References: <201407101215.s6ACF3v1055260@svn.freebsd.org> <201407101127.42252.jhb@freebsd.org> <1405025871.51056.3.camel@revolution.hippie.lan> <201407111003.57785.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1878.6) Cc: Ed Schouten , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Pietro Cerutti , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2014 19:38:40 -0000 On 11 Jul 2014, at 15:03, John Baldwin wrote: >=20 > = http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-cons= idered-bad-practice >=20 > is a decent start on the multitude of reasons to avoid using it. >=20 > I also avoid 'import * from foo' in Python for similar reasons. >=20 > OTOH, most of the C++ code bases I've had to work with do have a = global > 'using namespace std'. Great fun when someone decides it would be > convenient to add 'using namespace boost' to the mix. Note that, even though 'using namespace std' is a bad idea, 'using = std::vector; using std::string' and so on is not so bad.=20 For things that live in the base system, there's not much danger of = boost conflicts. 'using namespace std' is mostly a problem when it's in = headers (especially library headers), because it can break large amounts = of code. In a tiny utility, it's probably the right thing to do. =20 David